From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value |
Date: | 2012-05-11 17:45:35 |
Message-ID: | CA+Tgmobp6dTu++ihM45SCjAL=E=f_6MfUgxS_cryauc8vGMwcg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Fri, May 11, 2012 at 1:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I'm not convinced this is the best thing, and I'm definitely not happy
> with changing the behavior of working cases (ie, behavior on the master)
> in the back branches.
>
> Anybody else have an opinion on this?
I agree with you. Essentially, if we want age() to be stable, and
nobody's argued against that, we have to fix a point in the XID space
and do all of our computations relative to that point. The original
coding did that be using our XID, and I think what we ought to do is
use either (1) our XID or (2) the next XID as of the first point in
time at which age() is called, if we don't have an XID yet then.
That's a slight behavior change even when not in HS mode, because a
read-only transaction won't acquire an XID just by virtue of using
age(), so I would probably have chosen to fix this only in master and
to not back-patch anything, but in practice I think the downside of
that behavior change is very minimal (and it might even be an equally
minimal improvement for some people) so I think a back-patch is fine.
However, I don't really see any particular merit in removing our own
XID from the picture entirely: that changes the behavior more
significantly for no particular benefit.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-11 18:17:50 | Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value |
Previous Message | Tom Lane | 2012-05-11 17:28:25 | Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2012-05-11 17:52:46 | Re: Gsoc2012 idea, tablesample |
Previous Message | Tom Lane | 2012-05-11 17:28:25 | Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value |