pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: DEGLAVE Remi <remi.deglave@lyreco.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: [PG_UPGRADE] 9.6 to 10.5
Date: Fri, 10 Aug 2018 13:25:25 -0400
Message-ID: <20180810172525.GC7815@momjian.us> (raw)
In-Reply-To: <20180810172329.GA22736@paquier.xyz>
References: <AM6PR02MB3782E6A52BDA2A806B6A587AFE240@AM6PR02MB3782.eurprd02.prod.outlook.com>
	<20180810161245.GA7815@momjian.us>
	<20180810164240.GM13638@paquier.xyz>
	<20180810165347.GB7815@momjian.us>
	<20180810172329.GA22736@paquier.xyz>

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@momjian.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 +




view thread (20+ messages)  latest in thread

Message-ID: <20180810172525.GC7815@momjian.us>
Permalink:  ../20180810172525.GC7815@momjian.us/
Also on:    postgresql.org/message-id/20180810172525.GC7815@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, michael@paquier.xyz, remi.deglave@lyreco.com
  Subject: Re: [PG_UPGRADE] 9.6 to 10.5
  In-Reply-To: <20180810172525.GC7815@momjian.us>
  References: <AM6PR02MB3782E6A52BDA2A806B6A587AFE240@AM6PR02MB3782.eurprd02.prod.outlook.com> <20180810161245.GA7815@momjian.us> <20180810164240.GM13638@paquier.xyz> <20180810165347.GB7815@momjian.us> <20180810172329.GA22736@paquier.xyz> <20180810172525.GC7815@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox