Skip to content

Commit 777e6dd

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 6f15919 commit 777e6dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/pg_upgrade/controldata.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
150150
/* remove leading spaces */
151151
while (*p == ' ')
152152
p++;
153-
if (strcmp(p, "shut down\n") != 0)
153+
if (strcmp(p, "shut down\n") != 0 &&
154+
strcmp(p, "shut down in recovery\n") != 0)
154155
{
155156
if (cluster == &old_cluster)
156157
pg_fatal("The source cluster was not shut down cleanly.\n");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy