pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Sergey Konoplev <gray.ru@gmail.com>
Cc: matioli.matheus@gmail.com
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Cc: Максим Панченко <Panchenko@gw.tander.ru>
Cc: Сизов Сергей Павлович <sizov_sp@gw.tander.ru>
Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
Date: Mon, 13 Jan 2014 16:25:48 -0500
Message-ID: <19262.1389648348@sss.pgh.pa.us> (raw)
In-Reply-To: <20140113210245.GD14861@awork2.anarazel.de>
References: <CAL_0b1s4QCkFy_55kk_8XWcJPs7wsgVWf8vn4=jXe6V4R7Hxmg@mail.gmail.com>
	<20140106134815.GE28320@alap2.anarazel.de>
	<52CABF3E.2050004@vmware.com>
	<17450.1389644346@sss.pgh.pa.us>
	<20140113202600.GB14861@awork2.anarazel.de>
	<52D44F40.1000803@vmware.com>
	<20140113210245.GD14861@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (36+ messages)  latest in thread

Message-ID: <19262.1389648348@sss.pgh.pa.us>
Permalink:  ../19262.1389648348@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19262.1389648348@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@2ndquadrant.com, hlinnakangas@vmware.com, gray.ru@gmail.com, matioli.matheus@gmail.com, maxim.boguk@gmail.com, Panchenko@gw.tander.ru, sizov_sp@gw.tander.ru
  Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages
  In-Reply-To: <19262.1389648348@sss.pgh.pa.us>
  References: <CAL_0b1s4QCkFy_55kk_8XWcJPs7wsgVWf8vn4=jXe6V4R7Hxmg@mail.gmail.com> <20140106134815.GE28320@alap2.anarazel.de> <52CABF3E.2050004@vmware.com> <17450.1389644346@sss.pgh.pa.us> <20140113202600.GB14861@awork2.anarazel.de> <52D44F40.1000803@vmware.com> <20140113210245.GD14861@awork2.anarazel.de> <19262.1389648348@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox