Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2p1W-0008TM-WF for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:26:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W2p1W-00053S-FF for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:26:18 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2p1V-00053L-6S for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:26:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2p1K-00065U-Ur for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:26:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s0DLPmG3019263; Mon, 13 Jan 2014 16:25:48 -0500 From: Tom Lane To: Andres Freund cc: Heikki Linnakangas , Sergey Konoplev , matioli.matheus@gmail.com, pgsql-bugs , Maxim Boguk , =?utf-8?B?0JzQsNC60YHQuNC8INCf0LDQvdGH0LXQvdC60L4=?= , =?utf-8?B?0KHQuNC30L7QsiDQodC10YDQs9C10Lkg0J/QsNCy0LvQvtCy0LjRhw==?= Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages In-reply-to: <20140113210245.GD14861@awork2.anarazel.de> References: <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> Comments: In-reply-to Andres Freund message dated "Mon, 13 Jan 2014 22:02:45 +0100" Date: Mon, 13 Jan 2014 16:25:48 -0500 Message-ID: <19262.1389648348@sss.pgh.pa.us> X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund 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