Re: Hot Standby Failover Scenario - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Hot Standby Failover Scenario
Date
Msg-id 4F4D037D.1000200@2ndQuadrant.com
Whole thread Raw
In response to Hot Standby Failover Scenario  (Lucky Haryadi <xzorax89@gmail.com>)
List pgsql-hackers
On 02/27/2012 10:05 PM, Lucky Haryadi wrote:
> 3. When Master A fails to service, the database will failovered to Slave
> B by triggering with trigger file.

As soon as you trigger a standby, it changes it to a new timeline.  At 
that point, the series of WAL files diverges.  It's no longer possible 
to apply them to a system that is still on the original timeline, such 
as your original master A in this situation.  There's a good reason for 
that.  Let's say that A committed an additional transaction before it 
went down, but that commit wasn't replicated to B.  You can't just move 
records from B over anymore in that case.  The only way to make sure A 
is in sync again is to do a new base backup, which you can potentially 
accelerate using rsync to only copy what has changed.  I see a lot of 
people try to bypass one of the steps recommended in the manual using 
various schemes like yours, and they usually have a bug like this in 
there--sometimes obvious like this, sometimes subtle.  Trying to get too 
clever here is dangerous to your database.

Warning:  pgsql-hackers is the mailing list for people to discuss the 
development of PostgreSQL, not how to use it.  Questions like this 
should be asked on either the pgsql-admin or pgsql-general mailing list.  I'm not going to answer additional questions
likethis from you here 
 
on this list, and I doubt anyone else will either.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com


pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Initial 9.2 pgbench write results
Next
From: Robert Haas
Date:
Subject: Re: Initial 9.2 pgbench write results