From: MirrorX <mirrorx@gmail.com>
To: pgsql-admin@postgresql.org
Subject: switchover/switchback
Date: Fri, 1 Mar 2019 05:02:50 -0700 (MST)
Message-ID: <1551441770909-0.post@n3.nabble.com> (raw)
starting with 9.3 i ve read on the EDB site about the possibility to
switchover/switchback in a controlled manner.
this way the current master is stopped, the slave is promoted to master and
then since the old master's xlog position is behind the new master's, it can
be directly connected as a new slave without the need of it being rebuilt
and also without the need to use pg_rewind (since the xlog position hasnt
moved forward). this is been possible after 2 commits, the one about the
walsender sending all the xlogs to the slave when the master is being shut
down and the second is about the timeline and how the slave can continue
replicating when the timeline has changed.
i have tested this many times and it has always worked. however, i find it
strange that there is little awareness about it and pg professionals that i
meet keep saying that the old master (new slave) needs to be rebuilt.
could someone clarify if this works and if not why it could potentially
fail?
thank you in advance
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: mirrorx@gmail.com
Subject: Re: switchover/switchback
In-Reply-To: <1551441770909-0.post@n3.nabble.com>
* 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