Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, matioli(dot)matheus(at)gmail(dot)com, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, Максим Панченко <Panchenko(at)gw(dot)tander(dot)ru>, Сизов Сергей Павлович <sizov_sp(at)gw(dot)tander(dot)ru>
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Date: 2014-01-13 21:25:48
Message-ID: 19262.1389648348@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-13 21:29:59 Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Previous Message Andres Freund 2014-01-13 21:02:45 Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-01-13 21:26:46 Re: Disallow arrays with non-standard lower bounds
Previous Message Andres Freund 2014-01-13 21:18:21 Re: Standalone synchronous master