Re: upgrade slave in streaming replication from PG 10.4 to 10.5.1 - Mailing list pgsql-admin

From Johannes Truschnigg
Subject Re: upgrade slave in streaming replication from PG 10.4 to 10.5.1
Date
Msg-id 20181025180729.xoharwuuytno5b7j@vault.lan
Whole thread Raw
In response to upgrade slave in streaming replication from PG 10.4 to 10.5.1  ("Ghiurea, Isabella" <Isabella.Ghiurea@nrc-cnrc.gc.ca>)
List pgsql-admin
Hi Isabella,

On Thu, Oct 25, 2018 at 02:53:35PM +0000, Ghiurea, Isabella wrote:
> Gmorning List,
>
> we have a system running  PG streaming replication using repmgr4 , PG hosts
> are running Cent OS 7 with  PG 10.4, we have a request to upgrade to PG 10.5
> , my plan is to upgrade the slave db host first and later on /next month
> switch over and upgrade the existing PG master, we are using the following
> PG extensions: citext , pg_sphere,pg_stat_statements,pgrowlocks.

Your question reads to me as if you somehow missed the important change in
pg's version numbering scheme that 10.0 introduced: These days, 10.n to 10.n+1
is not considered a major release upgrade (of the sort that requires
pg_upgrade or dump+restore, etc.) any more; it's what (e.g.) 9.6.n to 9.6.n+1
used to be. Therefore, both versions you mentioned should be compatible and
allow physical replication between themselves, no matter if the master or the
slave are on the newer (minor) version than the other.

> Also in existing PG 10.4 cfg:/data/ pg_wal is a link  and we have cfg
> multiple tablespaces

Shouldn't matter, if your existing configuration works. Just install the new,
upgraded binaries, restart your service(s), and you should be good to go.

Personally, I'd upgrade the slave first- if anything goes awry (very unlikely,
but accidents happen!), you don't have to fail over that way.

> Are any issues   related to replication if we are upgrading the  PG slave host first ,  ?

Not in this scenario - if you were doing an actual major release upgrade (10.x
to 11.x or later), you'd have to get more creative and (probably - there are
options, if you cannot afford that kind of interruption, but they are a bit
more involved) break replication for a while. If it comes to that, I'm sure
someone the list will be able to help out.

Cheers, and best of luck with your upgrade procedure!

--
with best regards:
- Johannes Truschnigg ( johannes@truschnigg.info )

www:   https://johannes.truschnigg.info/
phone: +43 650 2 133337
xmpp:  johannes@truschnigg.info

Please do not bother me with HTML-email or attachments. Thank you.

Attachment

pgsql-admin by date:

Previous
From: "Ghiurea, Isabella"
Date:
Subject: upgrade slave in streaming replication from PG 10.4 to 10.5.1
Next
From: legrand legrand
Date:
Subject: Re: Is there a work around for partition key needed for constraint