Attached is the latest version. Changes:
. some tidy up as variously requested. . some common code is factored out . some descriptive comments added . platform specific stuff (e.g. spawn, reap) is factored out. --truncate_before_load is gone, and we now do this during parallel restore if we created the table. For a non-parallel restore the equivalent would be to run the whole restore in a single transaction.
One of the hardest parts of getting this to work was handling dependencies right. I will work on adding some more comments regarding that.
Simon asked about a way to adjust the number of worker children as we go along. That's way out of scope at this stage. In testing it appears that the sweet spot is roughly m=number_of_processors, which makes some sense, but more experience will clarify this.
cheers andrew
parallel_restore_14.patch.gz
Description: GNU Zip compressed data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers