Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBv-0000RF-6Y for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:37:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W2pBu-0002Ae-77 for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jan 2014 21:37:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBt-0002AX-6C for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:37:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W2pBq-0006Gs-V1 for pgsql-bugs@postgresql.org; Mon, 13 Jan 2014 21:37:00 +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 s0DLafbf019553; Mon, 13 Jan 2014 16:36:41 -0500 From: Tom Lane To: Heikki Linnakangas cc: Andres Freund , Sergey Konoplev , matioli.matheus@gmail.com, pgsql-bugs , Maxim Boguk , =?UTF-8?B?0JzQsNC60YHQuNC8INCf0LDQvdGH0LXQvdC60L4=?= , =?UTF-8?B?0KHQuNC30L7QsiDQodC10YDQs9C10Lkg0J/QsA==?= =?UTF-8?B?0LLQu9C+0LLQuNGH?= Subject: Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages In-reply-to: <52D45AD7.9080406@vmware.com> 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> <52D45AD7.9080406@vmware.com> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 13 Jan 2014 23:29:59 +0200" Date: Mon, 13 Jan 2014 16:36:41 -0500 Message-ID: <19552.1389649001@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 Heikki Linnakangas writes: > Good point. Normally, we expect the checksum to match on all pages that > we read during WAL replay, because full page writes will initialize any > page that is modified to an untorn state, before it's ever read. But we > can't rely on that in the extra read that btree_xlog_vacuum() does. But it's not an "extra" read. It's replicating a read that was done on the master in the btvacuumpage() scan. AFAICS the only way to fail on the slave and not the master is if the slave has inconsistent data, in which case you're at hazard of failing anyway. >> Now, you could argue that that shouldn't be the case because we're only >> entering that codepath once STANDBY_SNAPSHOT_READY and you might be >> right... > I don't think that saves us. standbyMode can be STANDBY_SNAPSHOT_READY, > before we reach consistency. Adding a check for reachedConsistency, > though, ought to fix it. Huh? Surely we're not letting queries in until we're consistent. 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