pgsql: pg_upgrade: only allow template0 to be non-connectable

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_upgrade: only allow template0 to be non-connectable
Date: 2015-05-16 04:10:14
Message-ID: E1YtTQU-0000lr-5t@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_upgrade: only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/31f5d3f3544f76892febccb4c2840ada9e765597

Modified Files
--------------
contrib/pg_upgrade/check.c | 54 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2015-05-16 04:40:29 pgsql: pg_upgrade: force timeline 1 in the new cluster
Previous Message Tom Lane 2015-05-16 02:15:04 pgsql: Avoid direct use of INFINITY.