On Fri, May 11, 2012 at 1:28 PM, Tom Lane <t...@sss.pgh.pa.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers