[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] Promotion of standby to master
From:       Ben Chobot <bench () silentmedia ! com>
Date:       2012-06-29 22:12:12
Message-ID: 158F294F-43FA-41BF-9C56-19C38DAAEFC7 () silentmedia ! com
[Download RAW message or body]

On Jun 29, 2012, at 12:16 PM, Andy Chambers wrote:

> I understand that it's possible to promote a "hot standby" pg server
> simply by creating the failover file.  In a scenario where there are
> multiple standby servers, is it possible to point the other standby
> servers to the new master without creating a new base backup?
> 
> When I tried to do this, I ran into the "timeline 2 of the primary
> does not match recovery target timeline 1".  I'm just trying to figure
> out if that's because the procedure I followed to promote the standby
> was wrong or because it's just not possible.

On your slaves, you need to have the line:

recovery_target_timeline=latest

This allows the slaves to notice that a new timeline has started and move to it. The \
one gotcha is that you have to make sure to promote a slave which is most ahead in \
terms of replication; otherwise, if you promote a slave which is further behind than \
another slave, and that could cause you grief when the lagging slave tries to \
replicate from the new master.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic