Re: How should pg_standby get over the gap of timeline? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: How should pg_standby get over the gap of timeline?
Date
Msg-id 49257CFC.900@enterprisedb.com
Whole thread Raw
In response to Re: How should pg_standby get over the gap of timeline?  ("Fujii Masao" <masao.fujii@gmail.com>)
Responses Re: How should pg_standby get over the gap of timeline?  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Re: How should pg_standby get over the gap of timeline?  ("Fujii Masao" <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao wrote:
> Hi, Heikki. Thanks for the comment!
> 
> On Thu, Nov 20, 2008 at 11:24 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> Fujii Masao wrote:
>>> In the current Synch Rep patch, the standby cannot catch up with the
>>> primary which has a bigger timeline.
>> That would only happen if you've performed an archive recovery in the
>> primary. If you've done PITR in the primary, I don't think there's any
>> guarantee that it's even possible to catch up the standby. The standby might
>> already have replayed a WAL file from an earlier timeline, that isn't part
>> of the history of the bigger timeline.
> 
> I assume the situation of making the standby (the original primary) catch up
> with the primary (the original standby) after failover. Since a timeline is
> incremented when a failover finishes archive recovery on a standby, the
> timelines differ between two servers.

That seems like a dangerous assumption. What if the standby had fallen 
behind before the failover? It's not safe to failover back to the 
original primary in that case. We'd need some kind of safeguards against 
that.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Error arguments in pl_exec.c
Next
From: Heikki Linnakangas
Date:
Subject: Re: [COMMITTERS] pgsql: Silence compiler warning about ignored return value.