Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Date
Msg-id 19262.1389648348@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
List pgsql-bugs
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-01-13 22:40:32 +0200, Heikki Linnakangas wrote:
>> I think it's more natural to return the empty page to the caller, rather
>> than InvalidBuffer.

> Hm. I don't see the advantage - and it makes it impossible to recognize
> that case at the caller level.

Huh?  The caller can do PageIsNew if it needs to tell the difference.
If we always return InvalidBuffer, it *can't* tell the difference.

> I thought about that approach at first as well, but I am not so sure
> it's sufficient. Isn't it quite possible that we'd end up reading a page
> that was *partially* written during a crash and due to that has a
> corrupted checksum?

If we did, then either the master would also have failed (so we'd not
be here), or there's a discrepancy between master and slave data,
in which case we've got bigger problems than this.

The addition of a bufmgr function to only return an already-in-cache
page is a possible future performance enhancement, but I do not care
for it as a bug fix that has to be back-patched as far as 9.0.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages