Re: [PG_UPGRADE] 9.6 to 10.5 - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: [PG_UPGRADE] 9.6 to 10.5
Date
Msg-id 20180810172329.GA22736@paquier.xyz
Whole thread Raw
In response to Re: [PG_UPGRADE] 9.6 to 10.5  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [PG_UPGRADE] 9.6 to 10.5  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
On Fri, Aug 10, 2018 at 12:53:47PM -0400, Bruce Momjian wrote:
> Oh, good point. I had not tested that.  I can develop a patch to handle
> this.  Was that the case in this upgrade report?

I cannot say if this is the issue reported here for sure, but the OP has
mentioned "clusters", which may point to the fact that he is trying to
upgrade standby(s) as well.

You need visibly a one-liner like that:
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -150,7 +150,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");

I have not tested it though.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PG_UPGRADE] 9.6 to 10.5
Next
From: Bruce Momjian
Date:
Subject: Re: [PG_UPGRADE] 9.6 to 10.5