pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: tarvip@gmail.com
Cc: pgsql-bugs@postgresql.org
Cc: Andres Freund <andres@2ndQuadrant.com>
Subject: Re: BUG #7710: Xid epoch is not updated properly during checkpoint
Date: Sun, 02 Dec 2012 12:44:11 -0500
Message-ID: <14320.1354470251@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+U5nML+j8Am1=UxqEMGgAXwX=CErrAK9OfgD4wtdFOBdNOj=g@mail.gmail.com>
References: <E1TdRCT-00008s-Tc@wrigleys.postgresql.org>
	<24367.1354402593@sss.pgh.pa.us>
	<CA+U5nM+qw3b74FrkY7z2bK73Q6svtCHLiGb3ZrHwXwLRp_nuDQ@mail.gmail.com>
	<CA+U5nM+q5nwzCyRa-n_vzFNLLPep1W+vtAt1ysWKTe0-hMscpw@mail.gmail.com>
	<11810.1354461920@sss.pgh.pa.us>
	<CA+U5nMJ7mUqRoUwHEKu1r6Nzz0CUduKe30rDTYV++U--vAG7hw@mail.gmail.com>
	<13206.1354466672@sss.pgh.pa.us>
	<CA+U5nML+j8Am1=UxqEMGgAXwX=CErrAK9OfgD4wtdFOBdNOj=g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Simon Riggs <simon@2ndQuadrant.com> writes:
> On 2 December 2012 16:44, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (14+ messages)

Message-ID: <14320.1354470251@sss.pgh.pa.us>
Permalink:  ../14320.1354470251@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14320.1354470251@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, simon@2ndQuadrant.com, tarvip@gmail.com, andres@2ndQuadrant.com
  Subject: Re: BUG #7710: Xid epoch is not updated properly during checkpoint
  In-Reply-To: <14320.1354470251@sss.pgh.pa.us>
  References: <E1TdRCT-00008s-Tc@wrigleys.postgresql.org> <24367.1354402593@sss.pgh.pa.us> <CA+U5nM+qw3b74FrkY7z2bK73Q6svtCHLiGb3ZrHwXwLRp_nuDQ@mail.gmail.com> <CA+U5nM+q5nwzCyRa-n_vzFNLLPep1W+vtAt1ysWKTe0-hMscpw@mail.gmail.com> <11810.1354461920@sss.pgh.pa.us> <CA+U5nMJ7mUqRoUwHEKu1r6Nzz0CUduKe30rDTYV++U--vAG7hw@mail.gmail.com> <13206.1354466672@sss.pgh.pa.us> <CA+U5nML+j8Am1=UxqEMGgAXwX=CErrAK9OfgD4wtdFOBdNOj=g@mail.gmail.com> <14320.1354470251@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