summaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/pg_upgrade.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2018-07-28 15:01:55 -0400
committerBruce Momjian <bruce@momjian.us>2018-07-28 15:01:55 -0400
commita326ca75b3296747bd70d62fa550b6fe004ecd92 (patch)
treea057939b16aa7e3b76b3dac5fe386abc6a0df5f0 /src/bin/pg_upgrade/pg_upgrade.c
parent5f2c5890e92c68163cb36b8551d45244d3280af9 (diff)
pg_upgrade: check for clean server shutdowns
Previously pg_upgrade checked for the pid file and started/stopped the server to force a clean shutdown. However, "pg_ctl -m immediate" removes the pid file but doesn't do a clean shutdown, so check pg_controldata for a clean shutdown too. Diagnosed-by: Vimalraj A Discussion: https://postgr.es/m/CAFKBAK5e4Q-oTUuPPJ56EU_d2Rzodq6GWKS3ncAk3xo7hAsOZg@mail.gmail.com Backpatch-through: 9.3
Diffstat (limited to 'src/bin/pg_upgrade/pg_upgrade.c')
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index a4faeb6513e..2992cf4b786 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -202,7 +202,8 @@ setup(char *argv0, bool *live_check)
* start, assume the server is running. If the pid file is left over
* from a server crash, this also allows any committed transactions
* stored in the WAL to be replayed so they are not lost, because WAL
- * files are not transferred from old to new servers.
+ * files are not transferred from old to new servers. We later check
+ * for a clean shutdown.
*/
if (start_postmaster(&old_cluster, false))
stop_postmaster(false);