hæx.com logo

Fix for Heap exhaustion while migrate mysql to postgres

Ran into multiple issues while migrating a mysql DB to postgres. Errors like

Heap exhausted during garbage collection: 352 bytes available, 416 requested.

I tried allocating more memory everywhere, but in in the end the prefetch rows finally worked for me

Example migrating mysql to postgres with prefetch:

pgloader --with "prefetch rows = 10000" mysql://user:password@127.0.0.1/dbname postgresql://user:password@127.0.0.1/dbname