Обсуждение: Upgrading hot standbys

Поиск
Список
Период
Сортировка

Upgrading hot standbys

От
Aaron Burnett
Дата:


Greetings,


I'm in the process of upgrading PG 9.1.3 to 9.4.1 in the near future.


I have several machines which each house unique databases. Each of those are replicated to a standby server with matching configurations. A total of 10 servers, 5 masters, 5 slaves. Everything runs on Ubuntu.


My question, as I can't seem to find any documentation on this part, is once I successfully upgrade the master I will need to upgrade the standby as well. Will I have to rebuild the standby from scratch, or will the standby pick up where it was before the upgrade if I do things correctly?


Thanking you in advance,



Aaron

dunnhumby limited is a limited company registered in England and Wales with registered number 02388853 and VAT registered number 927 5871 83. Our registered office is at Aurora House, 71-75 Uxbridge Road, London W5 5SL. The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error you should delete it from your system immediately and advise the sender. dunnhumby may monitor and record all emails. The views expressed in this email are those of the sender and not those of dunnhumby.

Re: Upgrading hot standbys

От
Magnus Hagander
Дата:
On Wed, Apr 29, 2015 at 6:19 AM, Aaron Burnett <Aaron.Burnett@us.dunnhumby.com> wrote:


Greetings,


I'm in the process of upgrading PG 9.1.3 to 9.4.1 in the near future.


I have several machines which each house unique databases. Each of those are replicated to a standby server with matching configurations. A total of 10 servers, 5 masters, 5 slaves. Everything runs on Ubuntu.


My question, as I can't seem to find any documentation on this part, is once I successfully upgrade the master I will need to upgrade the standby as well. Will I have to rebuild the standby from scratch, or will the standby pick up where it was before the upgrade if I do things correctly?



You upgrade the master, and then you rebuild the standbys from a new basebackup (using pg_basebackup or manually with start/stop backups etc). You can't upgrade the standbys and have them re-join the master, they have to be redone from scratch.
 
--

Re: Upgrading hot standbys

От
Bruce Momjian
Дата:
On Wed, Apr 29, 2015 at 01:13:13PM +0200, Magnus Hagander wrote:
> On Wed, Apr 29, 2015 at 6:19 AM, Aaron Burnett <Aaron.Burnett@us.dunnhumby.com>
> wrote:
>
>
>
>     Greetings,
>
>
>     I'm in the process of upgrading PG 9.1.3 to 9.4.1 in the near future.
>
>
>     I have several machines which each house unique databases. Each of those
>     are replicated to a standby server with matching configurations. A total of
>     10 servers, 5 masters, 5 slaves. Everything runs on Ubuntu.
>
>
>     My question, as I can't seem to find any documentation on this part, is
>     once I successfully upgrade the master I will need to upgrade the standby
>     as well. Will I have to rebuild the standby from scratch, or will the
>     standby pick up where it was before the upgrade if I do things correctly?
>
>
>
>
> You upgrade the master, and then you rebuild the standbys from a new basebackup
> (using pg_basebackup or manually with start/stop backups etc). You can't
> upgrade the standbys and have them re-join the master, they have to be redone
> from scratch.

Well, 9.5's pg_upgrade manual page has instructions on upgrading
streaming standbys via rsync, and it will work for all versions of
pg_upgrade back to 9.0:

    http://www.postgresql.org/docs/devel/static/pgupgrade.html

Let me know if you have any problems.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +