Skip to content

Commit 235eab0

Browse files
committed
pg_upgrade: fix shutdown check for standby servers
Commit 244142d 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
1 parent 57b0e0c commit 235eab0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pg_upgrade/controldata.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
148148
/* remove leading spaces */
149149
while (*p == ' ')
150150
p++;
151-
if (strcmp(p, "shut down\n") != 0)
151+
if (strcmp(p, "shut down\n") != 0 &&
152+
strcmp(p, "shut down in recovery\n") != 0)
152153
{
153154
if (cluster == &old_cluster)
154155
pg_log(PG_FATAL, "The source cluster was not shut down cleanly.\n");

0 commit comments

Comments
 (0)