Re: [PG_UPGRADE] 9.6 to 10.5

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Martín Marqués <martin(at)2ndquadrant(dot)com>
Cc: DEGLAVE Remi <remi(dot)deglave(at)lyreco(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: [PG_UPGRADE] 9.6 to 10.5
Date: 2018-08-17 14:27:59
Message-ID: 20180817142759.GB22502@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Aug 16, 2018 at 05:23:58PM -0400, Bruce Momjian wrote:
> On Thu, Aug 16, 2018 at 04:41:04PM -0300, Martín Marqués wrote:
> > 2018-08-16 14:58 GMT-03:00 Bruce Momjian <bruce(at)momjian(dot)us>:
> > > On Thu, Aug 16, 2018 at 12:36:20PM -0400, Bruce Momjian wrote:
> > >> I think we just need to add an error message to say the server must be
> > >> shut down as a _primary_ server, not as a standby server, and we can
> > >> recommend to read the documentation on the use of rsync.
> > >
> > > Attached is a proposed patch.
> >
> > The logic in the patch is ok, but I'd use a different error message,
> > one that just mentions that you can only upgrade a primary node:
> >
> > The source cluster was shut down while in recovery mode, but
> > pg_upgrade expected a primary node.
>
> Well, if people are hitting the error because they are using pg_upgrade
> on standbys, I assume we should give them some instruction that you
> should not do that, no?
>
> > The error referring to the target node should be similar, although I
> > can't think of how to phrase it without saying "how on earth did you
> > get a standby for the target! RTFM!" :-D
>
> Yeah, for consistency I made it match. ;-)

I have applied the patch, with a better error message that mentions the
documentation:

https://git.postgresql.org/pg/commitdiff/b94f7b5350e97ef0587c0c64aed6eb940d964c06

--
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 +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2018-08-17 14:38:41 Re: BUG #15336: Wrong cursor's bacward fetch results in select with ALL(subquery)
Previous Message Magnus Hagander 2018-08-17 14:17:56 Re: Domain: Peer's Certificate has expired