From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support for --jobs in reindexdb
Date: Sat, 27 Jul 2019 13:24:14 +0000
Message-ID: <E1hrMgI-0005Bv-N8@gemulon.postgresql.org> (raw)
Add support for --jobs in reindexdb
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
Reviewed-by: Sergei Kornilov, Michael Paquier
Discussion: https://postgr.es/m/CAOBaU_YrnH_Jqo46NhaJ7uRBiWWEcS40VNRQxgFbqYo9kApUsg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5ab892c391c6bc54a00e7a8de5cab077cabace6a
Modified Files
--------------
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add support for --jobs in reindexdb
In-Reply-To: <E1hrMgI-0005Bv-N8@gemulon.postgresql.org>
References: <E1hrMgI-0005Bv-N8@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox