Unverified Commit 881a7647 authored by Dimitri Fontaine's avatar Dimitri Fontaine
Browse files

Review the worker processes strategy and refactor the code.

Instead of creating a new worker process for each table, we now create
exactly --tableJobs processes and each of them scan through the tables array
in parallel, using a semaphore to pick the next table that's not been picked
already.

Then when creating the indexes, a main "driver" sub-process is created to
allow for asynchronous behaviour, and this driver in turns creates as many
processes as we have indexes to create on the target database instance.

The VACUUM ANALYZE operation is now started in parallel to the indexes
builds, too.
parent 9d4c3665
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment