Re: BUG #5011: Standby recovery unable to follow timeline change - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5011: Standby recovery unable to follow timeline change
Date
Msg-id 11243.1251293781@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5011: Standby recovery unable to follow timeline change  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: BUG #5011: Standby recovery unable to follow timeline change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Our last-minute changes in 8.4 to allow checkpoint record to be created,
> while forbidding other WAL insertions, missed that CreateCheckPoint()
> calls AdvanceXLInsertBuffer() which requires a valid ThisTimeLineID to
> be set. We need to initialize ThisTimeLineID before we call
> AdvanceXLInsertBuffer().

Ah-hah ...

> Attached is a straightforward fix which initializes ThisTimeLineID
> before the AdvanceXLInsertBuffer() call. Barring objections, I'll commit
>  that.

... but this solution is astonishingly ugly.  I think we should move up
the LocalSetXLogInsertAllowed call, instead.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5008: Server Startup Problem - When server is configured for SSL
Next
From: Magnus Hagander
Date:
Subject: Re: BUG #5008: Server Startup Problem - When server is configured for SSL