ankane/pgsync

How to use/increase parallelism

AzeemIqbal opened this issue · 2 comments

Hi, love the tool

In the docs it mentions to "Use groups when possible to take advantage of parallelism."

I'm trying the below

pgsync group1 --from pgsync_from --to pgsync_to

My output seems to show that it is syncing each table in the group sequentially, how can i sync multiple tables concurrently? (In parallel?)

add --jobs 4 or however many jobs you want. This is not a bug, please visit stackoverflow for more help.

ankane commented

Hey @AzeemIqbal, it should use parallelism by default unless an option that requires sequential syncing like --defer-constraints is specified. It'll use processes on Linux and Mac and threads on Windows, and defaults to the number of processors. As @blairanderson mentioned, you can use the --jobs option to increase or decrease it.