pg_upgrade: start/stop new server after pg_resetwal
authorBruce Momjian <[email protected]>
Tue, 20 Jun 2017 17:20:02 +0000 (13:20 -0400)
committerBruce Momjian <[email protected]>
Tue, 20 Jun 2017 17:20:02 +0000 (13:20 -0400)
commit5c890645d9c4f57d49110e7943914c11012d3e85
tree5091d24814e93a055727442bc9548854db88e8e5
parentf1e1f990887b87174b6c291f5a60d2b2f4393dce
pg_upgrade:  start/stop new server after pg_resetwal

When commit 0f33a719fdbb5d8c43839ea0d2c90cd03e2af2d2 removed the
instructions to start/stop the new cluster before running rsync, it was
now possible for pg_resetwal/pg_resetxlog to leave the final WAL record
at wal_level=minimum, preventing upgraded standby servers from
reconnecting.

This patch fixes that by having pg_upgrade unconditionally start/stop
the new cluster after pg_resetwal/pg_resetxlog has run.

Backpatch through 9.2 since, though the instructions were added in PG
9.5, they worked all the way back to 9.2.

Discussion: https://postgr.es/m/20170620171844[email protected]

Backpatch-through: 9.2
contrib/pg_upgrade/check.c
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.h