Reconnecting a slave to a newly-promoted master

Started by Shawn Mulloneyalmost 8 years ago2 messagesgeneral
Jump to latest
#1Shawn Mulloney
smolloney@gmail.com

I'm unclear on the prerequisites for what must be a very common scenario:

There are three PostgreSQL machines: A, B, and C. B and C are slaves off of
the master, A. A fails, and B is promoted to being the new master. Can C
just be pointed at A and have it "just work"?

#2Michael Paquier
michael@paquier.xyz
In reply to: Shawn Mulloney (#1)
Re: Reconnecting a slave to a newly-promoted master

On Mon, Jul 09, 2018 at 05:58:53PM -0700, Shawn Mulloney wrote:

There are three PostgreSQL machines: A, B, and C. B and C are slaves off of
the master, A. A fails, and B is promoted to being the new master. Can C
just be pointed at A and have it "just work"?

In your question I am pretty sure that you mean "B" instead of "A" as
"A" has died and is off the grid. The answer to that question would be
perhaps no, as if C could have replayed WAL ahead of B in which case you
could finish with a corrupted C instance if trying to reconnect it
directly to the promoted B.
--
Michael