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

From Robert Haas
Subject Re: Hot Standby: Startup at shutdown checkpoint
Date
Msg-id p2t603c8f071004080649m972635bbr86c08be2441741f6@mail.gmail.com
Whole thread Raw
In response to Re: Hot Standby: Startup at shutdown checkpoint  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Thu, Apr 8, 2010 at 6:16 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> If standby_mode is enabled and there is no source of WAL, then we get a
> stream of messages saying
>
> LOG:  record with zero length at 0/C000088
> ...
>
> but most importantly we never get to the main recovery loop, so Hot
> Standby never gets to start at all. We can't keep retrying the request
> for WAL and at the same time enter the retry loop, executing lots of
> things that expect non-NULL pointers using a NULL xlog pointer.

This is pretty much a corner case, so I don't think it's a good idea
to add a new mode to handle it.  It also seems like it would be pretty
inconsistent if we allow WAL to be dropped in pg_xlog, but only if we
are also doing archive recovery or streaming replication.  If we can't
support this case with the same code path we use otherwise, I think we
should revert to disallowing it.

Having said that, I guess I don't understand how having a source of
WAL solves the problem described above.  Do we always have to read at
least 1 byte of WAL from either SR or the archive before starting up?
If not, why do we need to do so here?

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Remaining Streaming Replication Open Items
Next
From: Olivier Baheux
Date:
Subject: Re: system table/view and sequence