Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBz-0000RW-Jc for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:37:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W2pBz-0002F9-30 for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:37:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBx-0002Da-EB for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:37:05 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBu-0003Ni-MI for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:37:05 +0000 Received: from anarazel.de (p54AF4121.dip0.t-ipconnect.de [84.175.65.33]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MGG19-1W6xuW3Dbb-00EwVz; Mon, 13 Jan 2014 22:37:00 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 191E5105A05; Mon, 13 Jan 2014 22:36:59 +0100 (CET) Date: Mon, 13 Jan 2014 22:36:59 +0100 From: Andres Freund To: Tom Lane 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 Message-ID: <20140113213659.GC5838@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> <19262.1389648348@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19262.1389648348@sss.pgh.pa.us> X-Provags-ID: V02:K0:TJpAur6oLikdxrqo/Zn8ezvPSkOGoaHBT9pbp6ndtTC 5k9j2RpnsU0DWgSFox8Z7XhLgotcVNL4zPm8G3mFI7Xl7uN9sP RMQFQj2eFQoSqdCbvCPvKA4Ov9jCcPHKiS2VzRB1w/9G/zRgxj aZIFKiBjjgZsXXThwks2NfgkO3yV3dCtGhBEAAoGnAuDYVq6/U Yn6qtl/sjbVMZJpUvh6DA/llPOimrISpJ4rTREwc8xSi76tOFi F31RzvaZoix/afiq+Go3/BlKp80iNsS9WbTTsaayEB/T3PSUP+ Mkk7JRH1xaAhcBa6ZnuUNV24R/9UL2rFVsjMtfVUS7lAnMmpQH zqz714qFd/vZjoFwdnUvAtSgb/xeQS9/un2hf5mVL X-Pg-Spam-Score: -1.9 (-) 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 On 2014-01-13 16:25:48 -0500, Tom Lane wrote: > > 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. If we crashed during replay and then restart replaying it might, at least without the STANDBY_SNAPSHOT_READY check. I think. XLOG_BTREE_VACUUM block 10, lastVacuumed 1 XLOG_BTREE_INSERT_SPLIT XLOG_BTREE_INSERT_LEAF block 5 XLOG_BTREE_VACUUM block 10, lastVacuumed 1 -- crash if we now restart replaying block 5 can be in just about any state. ... tinker ... Hm, the standbyMode check isn't sufficient, it's independent from other consistency checks (like minRecoveryPoint). But we can extend that check in the redo routine to check for full consistency, which should be fine since there won't be any relevant pins on buffers before that anyway. > 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. Yea, the only argument I see is that it actually might end up being simpler, that's why I brought it up. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs