postgres.git / summary / log / commit / refs

commit    235eab04ec01b5308de0264798a43dc04414ba0a
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Tue Aug 14 21:19:02 2018 +0000
First released in: 12.0, 9.3.25, 9.4.20, 9.5.15, 9.6.11, 10.6, 11.0

    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


contrib/pg_upgrade/controldata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/pg_upgrade/controldata.c b/contrib/pg_upgrade/controldata.c index a480e3c7da1..e3386f81019 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_log(PG_FATAL, "The source cluster was not shut down cleanly.\n"); [parent: 57b0e0c0bbca]