Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1foBAK-0001p9-A9 for pgsql-bugs@arkaria.postgresql.org; Fri, 10 Aug 2018 17:25:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1foBAI-0003m5-L5 for pgsql-bugs@arkaria.postgresql.org; Fri, 10 Aug 2018 17:25:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1foBAI-0003ly-Bh for pgsql-bugs@lists.postgresql.org; Fri, 10 Aug 2018 17:25:30 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1foBAF-0005er-G9 for pgsql-bugs@postgresql.org; Fri, 10 Aug 2018 17:25:29 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1foBAD-0002Fo-DN; Fri, 10 Aug 2018 13:25:25 -0400 Date: Fri, 10 Aug 2018 13:25:25 -0400 From: Bruce Momjian To: Michael Paquier Cc: DEGLAVE Remi , "pgsql-bugs@postgresql.org" Subject: Re: [PG_UPGRADE] 9.6 to 10.5 Message-ID: <20180810172525.GC7815@momjian.us> References: <20180810161245.GA7815@momjian.us> <20180810164240.GM13638@paquier.xyz> <20180810165347.GB7815@momjian.us> <20180810172329.GA22736@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180810172329.GA22736@paquier.xyz> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 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 +