pg_upgrade: only allow template0 to be non-connectable

Bruce Momjian <bruce@momjian.us>

Commit: 2a55e713431abf688e656144a4babc6ee5563ffb
Author: Bruce Momjian <bruce@momjian.us>
Date: 2015-05-16T04:10:03Z
Releases: 9.2.11
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

Files

PathChange+/−
contrib/pg_upgrade/check.c modified +54 −0