Re: Resync second slave to new master

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dylan Luong <Dylan(dot)Luong(at)unisa(dot)edu(dot)au>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Resync second slave to new master
Date: 2018-03-06 07:24:46
Message-ID: 20180306072446.GA587@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 06, 2018 at 06:00:40AM +0000, Dylan Luong wrote:
> So everytime after promoting Slave to become master (either manually
> or automatic), just stop Slave2 and run pg_rewind on slave2 against
> the new maser (old slave1). And when old master server is available
> again, use pg_rewind on that serve as well against new master to
> return to original configuration.

Yes. That's exactly the idea. Running pg_rewind on the old master will
be necessary anyway because you need to stop it cleanly once, which will
cause it to generate WAL records at least for the shutdown checkpoint,
while doing it on slave 2 may be optional, still safer to do.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Luzanov 2018-03-06 09:17:19 Re: psql variables in the DO command
Previous Message Benjamin Scherrey 2018-03-06 06:25:38 Re: Best options for new PG instance