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 10:25:20 -0500
Message-ID: <11810.1354461920@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+U5nM+q5nwzCyRa-n_vzFNLLPep1W+vtAt1ysWKTe0-hMscpw@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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Simon Riggs <simon@2ndQuadrant.com> writes:
> I've applied an absolutely minimal fix on this, which introduces no
> other changes that could cause unforeseen consequences.

This is not what we'd agreed to do, I thought.

Now that I've thought more about this bug, the existing coding is flat
out wrong, with or without correction of the epoch.  As you yourself
just wrote in a comment, the checkpoint record logically belongs to the
"redo" point in the WAL stream, not to where it's physically located.
Having it carry a nextXid that belongs to the later point is simply
wrong.  Having it carry different nextXids depending on wal_level is
even more wrong.

I can point right now to one misbehavior this causes: if you run a
point-in-time recovery with a stop point somewhere in the middle of the
checkpoint, you should end up with a nextXid corresponding to the stop
point.  This hack in LogStandbySnapshot causes you to end up with a
much later nextXid, if you were running hot-standby.

> Others may wish to go further, overriding my patches, as they choose.

Okay, I will take the responsibility for changing this, but it needs to
change.  This coding was ill-considered from the word go.

			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)  latest in thread

Message-ID: <11810.1354461920@sss.pgh.pa.us>
Permalink:  ../11810.1354461920@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11810.1354461920@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: <11810.1354461920@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>

* 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