From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | DEGLAVE Remi <remi(dot)deglave(at)lyreco(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: [PG_UPGRADE] 9.6 to 10.5 |
Date: | 2018-08-10 17:25:25 |
Message-ID: | 20180810172525.GC7815@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Aug 10, 2018 at 07:23:29PM +0200, Michael Paquier wrote:
> 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.
I was going to do:
/* handle "shut down" and "shut down in recovery" (on standbys)
strncmp(p, "shut down", strlen("shut down"))
but maybe yours is clearer.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-08-10 17:35:55 | Re: [PG_UPGRADE] 9.6 to 10.5 |
Previous Message | Michael Paquier | 2018-08-10 17:23:29 | Re: [PG_UPGRADE] 9.6 to 10.5 |