]> granicus.if.org Git - postgresql/commit
pg_upgrade: only allow template0 to be non-connectable
authorBruce Momjian <bruce@momjian.us>
Sat, 16 May 2015 04:10:03 +0000 (00:10 -0400)
committerBruce Momjian <bruce@momjian.us>
Sat, 16 May 2015 04:10:03 +0000 (00:10 -0400)
commit31f5d3f3544f76892febccb4c2840ada9e765597
tree36c25e6fc9442adbe5df001a3ee08078d3881ca4
parentd0ddcf62e2b883222dc7046b6e05ed37f13d1802
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
contrib/pg_upgrade/check.c