diff options
author | Bruce Momjian <bruce@momjian.us> | 2018-08-14 17:19:02 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2018-08-14 17:19:02 -0400 |
commit | a034c6737412f4c276ee707ee1b7e60c8591909e (patch) | |
tree | 9872393201eee7216cec095dc0b337c56c7e1316 | |
parent | 7bfd381c21c841b9766227f5b65cd62fa8408780 (diff) |
pg_upgrade: fix shutdown check for standby servers
Commit 244142d32afd02e7408a2ef1f249b00393983822 only tested for the
pg_controldata output for primary servers, but standby servers have
different "Database cluster state" output, so check for that too.
Diagnosed-by: Michael Paquier
Discussion: https://postgr.es/m/20180810164240.GM13638@paquier.xyz
Backpatch-through: 9.3
-rw-r--r-- | contrib/pg_upgrade/controldata.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pg_upgrade/controldata.c b/contrib/pg_upgrade/controldata.c index a06f8f7c0d8..cfc9d0969a6 100644 --- a/contrib/pg_upgrade/controldata.c +++ b/contrib/pg_upgrade/controldata.c @@ -148,7 +148,8 @@ get_control_data(ClusterInfo *cluster, bool live_check) /* remove leading spaces */ while (*p == ' ') p++; - if (strcmp(p, "shut down\n") != 0) + if (strcmp(p, "shut down\n") != 0 && + strcmp(p, "shut down in recovery\n") != 0) { if (cluster == &old_cluster) pg_fatal("The source cluster was not shut down cleanly.\n"); |