pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Dylan Luong <Dylan.Luong@unisa.edu.au>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Resync second slave to new master
Date: Tue, 6 Mar 2018 16:24:46 +0900
Message-ID: <20180306072446.GA587@paquier.xyz> (raw)
In-Reply-To: <aac57117a27e440a864abe81f297c05f@ITUPW-EXMBOX3B.UniNet.unisa.edu.au>
References: <4acf4492b18c4c4ca42bebc8570c84a5@ITUPW-EXMBOX3B.UniNet.unisa.edu.au>
	<20180306052341.GA4717@paquier.xyz>
	<aac57117a27e440a864abe81f297c05f@ITUPW-EXMBOX3B.UniNet.unisa.edu.au>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)  latest in thread

Message-ID: <20180306072446.GA587@paquier.xyz>
Permalink:  ../20180306072446.GA587@paquier.xyz/
Also on:    postgresql.org/message-id/20180306072446.GA587@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: michael@paquier.xyz, Dylan.Luong@unisa.edu.au
  Subject: Re: Resync second slave to new master
  In-Reply-To: <20180306072446.GA587@paquier.xyz>
  References: <4acf4492b18c4c4ca42bebc8570c84a5@ITUPW-EXMBOX3B.UniNet.unisa.edu.au> <20180306052341.GA4717@paquier.xyz> <aac57117a27e440a864abe81f297c05f@ITUPW-EXMBOX3B.UniNet.unisa.edu.au> <20180306072446.GA587@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox