Search Postgresql Archives

Re: Promotion of standby to master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux