Re: Hot Standby: Startup at shutdown checkpoint - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby: Startup at shutdown checkpoint
Date
Msg-id 1270742300.8305.384.camel@ebony
Whole thread Raw
In response to Re: Hot Standby: Startup at shutdown checkpoint  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Hot Standby: Startup at shutdown checkpoint
List pgsql-hackers
On Thu, 2010-04-08 at 18:35 +0300, Heikki Linnakangas wrote:
> 
> > So I have introduced the new mode ("snapshot mode") to enter hot
> standby
> > anyway. That avoids us having to screw around with the loop logic
> for
> > redo. I don't see any need to support the case of where we have no
> WAL
> > source defined, yet we want Hot Standby but we also want to allow
> > somebody to drop a WAL file into pg_xlog at some future point. That
> has
> > no use case of value AFAICS and is too complex to add at this stage
> of
> > the release cycle.
> 
> You don't need a new mode for that. Just do the same "are we
> consistent now?" check you do in the loop once before calling
> ReadRecord to fetch the record that follows the checkpoint pointer.
> Attached is a patch to show what I mean. We just need to let
> postmaster know that recovery has started a bit earlier, right after
> processing the checkpoint record, not delaying it until we've read the
> first record after it.

OK, that seems better. I'm happy with that instead.

Have you tested this? Is it ready to commit?

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Unsafe threading in syslogger on Windows
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot Standby: Startup at shutdown checkpoint