When doing a schema-level or a database-level operation, a list of relations to build is created which gets processed in parallel using multiple connections, based on the recent refactoring for parallel slots in src/bin/scripts/. System catalogs are processed first in a serialized fashion to prevent deadlocks, followed by the rest done in parallel.
This new option is not compatible with --system as reindexing system catalogs in parallel can lead to deadlocks, and with --index as there is no conflict handling for indexes rebuilt in parallel depending in the same relation.
Author: Julien Rouhaud
5ab892c391 Add support for --jobs in reindexdb
doc/src/sgml/ref/reindexdb.sgml | 23 ++
src/bin/scripts/Makefile | 2 +-
src/bin/scripts/reindexdb.c | 416 ++++++++++++++++++++++++++++++++-----
src/bin/scripts/t/090_reindexdb.pl | 44 +++-
4 files changed, 432 insertions(+), 53 deletions(-)