Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TfDaV-0002vs-D1 for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Dec 2012 17:44:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TfDaU-0003BG-Ev for pgsql-bugs@arkaria.postgresql.org; Sun, 02 Dec 2012 17:44:18 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TfDaT-0003BA-EZ for pgsql-bugs@postgresql.org; Sun, 02 Dec 2012 17:44:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TfDaR-0000XJ-QH for pgsql-bugs@postgresql.org; Sun, 02 Dec 2012 17:44:16 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qB2HiB6S014321; Sun, 2 Dec 2012 12:44:11 -0500 (EST) From: Tom Lane To: Simon Riggs cc: tarvip@gmail.com, pgsql-bugs@postgresql.org, Andres Freund Subject: Re: BUG #7710: Xid epoch is not updated properly during checkpoint In-reply-to: References: <24367.1354402593@sss.pgh.pa.us> <11810.1354461920@sss.pgh.pa.us> <13206.1354466672@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Sun, 02 Dec 2012 16:56:16 +0000" Date: Sun, 02 Dec 2012 12:44:11 -0500 Message-ID: <14320.1354470251@sss.pgh.pa.us> 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 Simon Riggs writes: > On 2 December 2012 16:44, Tom Lane wrote: >> As far as the concern about new bugs is concerned: if we start replay >> from this checkpoint, we will certainly not consider that the DB is >> consistent until we reach the checkpoint's physical position. And by >> that point we'll have replayed the XLOG_RUNNING_XACTS record emitted by >> LogStandbySnapshot, so our idea of the nextXid should be fully up to >> date anyway. The same goes for checkpoints encountered later in the >> replay run --- they'd just be duplicative of the preceding >> XLOG_RUNNING_XACTS record. There is no reason to put the same XID into >> the checkpoint record. > Exactly, the end result is identical, but the intermediate states may differ. Indeed, and the intermediate states are *wrong*, as things stand. But they won't be visible to backends AFAICS, since we aren't allowing any backends in yet. I'm more concerned about the possible effects on tools that scan WAL --- and in that connection, it's not apparent to me that your "minimal fix" is any safer than the other change. It's a behavioral change either way. I think correct tools shouldn't have a problem either way, but it seems to me to be real hard to argue that buggy tools would be affected by one change but not the other. More likely it could go either way depending on the nature of the bug. 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