Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On Tue, Jun 7, 2011 at 8:41 PM, Ray Stell <stellr(at)cns(dot)vt(dot)edu> wrote:
>> On Tue, Jun 07, 2011 at 11:59:07AM -0700, A J wrote:
>>> We then rely on filesystem tools (or other third party tools) to get the
>>> original master in sync with the new master efficiently and then make it join as
>> the doc would not be corrupted by an additional few words that stated as such:
>> "To return to normal operation, a standby server must be recreated using
>> external tools such as rsync, either on the former primary system when
>> it comes up, or on a third, possibly new, system."
> You need repmgr: http://www.repmgr.org/
Well, I am not sure on the 9.x versions but, we used to do reversible
master/standby with log shipping on the 8.x versions quite routinely,
sometimes reshaping clusters of multiple standbys., designating a new
master, restarting the old master in recovery mode and repointing the
The procedure was similar to...
apps down and locked out
pg_rotate_xlog() on master
verify final log received on standbys and consumed
bring up new master
kill immediate on old master and remaining standbys
configure old master as standby w/recovery.conf and point to new xlog
repoint other standbys to new repository and restart
There was no need to reinitialize from scratch or rsync the old master
or other standbys.
Somewhere between 8.2 and 8.4 there was a change that would require
you to increment the recovery target timeline during this operation.
It took me a bit of head scratching to get it right.
This capability was apparently little known and used, perhaps due to
uncertainty that it was viable, given the undocumented nature of
Disclaimer: I do not know if this still works on 9.x using either log
shipping or streaming replication.
I covered this strategy briefly during my talk at the 2010 Pg-East
conference in Philly.
> Simon Riggs http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
Postgres DBA/Development Consulting
In response to
pgsql-admin by date
|Next:||From: Fujii Masao||Date: 2011-06-08 01:51:25|
|Subject: Re: Switchover of Master and Slave roles|
|Previous:||From: Simon Riggs||Date: 2011-06-07 22:07:10|
|Subject: Re: Sync replication waits for only 1 slave|