Re: Resync second slave to new master - Mailing list pgsql-general

From Michael Paquier
Subject Re: Resync second slave to new master
Date
Msg-id 20180306072446.GA587@paquier.xyz
Whole thread Raw
In response to RE: Resync second slave to new master  (Dylan Luong <Dylan.Luong@unisa.edu.au>)
Responses RE: Resync second slave to new master  (Dylan Luong <Dylan.Luong@unisa.edu.au>)
List 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

Attachment

pgsql-general by date:

Previous
From: Benjamin Scherrey
Date:
Subject: Re: Best options for new PG instance
Next
From: Pavel Luzanov
Date:
Subject: Re: psql variables in the DO command