pgsql: Un-break parallel pg_upgrade. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Un-break parallel pg_upgrade.
Date
Msg-id E1eq4lX-0002Wy-Jf@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Un-break parallel pg_upgrade.
List pgsql-committers
Un-break parallel pg_upgrade.

Commit b3f840120 changed pg_upgrade so that it'd actually drop and
re-create the template1 and postgres databases in the new cluster.
That works fine, serially.  With the -j option it's not so fine, because
other per-database jobs might be launched while the template1 database is
dropped.  Since they attempt to connect there to start up, kaboom.

This is the cause of the intermittent failures buildfarm member jacana
has been showing for the last month; evidently it is the only BF member
configured to run the pg_upgrade test with parallelism enabled.

Fix by processing template1 separately before we get into the parallel
sub-job launch loop.  (We could alternatively have made the postgres DB
be the special case, but it seems likely that template1 will contain
less stuff and so we lose less parallelism with this choice.)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5b570d771b80aadc98755208f8f1b81e9a5eb366

Modified Files
--------------
src/bin/pg_upgrade/pg_upgrade.c | 59 +++++++++++++++++++++++++++++++++--------
1 file changed, 48 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Release notes for 10.3, 9.6.8, 9.5.12, 9.4.17, 9.3.22.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Translation updates