Re: age(xid) on hot standby

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, Alvaro Herrera <alvherre@commandprompt.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-05-09T16:13:28Z
Lists: pgsql-hackers
On 9 May 2012 15:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>>> We should just use MyPgXact->xid
>>> rather than add more to the transaction path
>>>
>>> I'll simplify the patch and commit.
>
>> Committed, but forgot to give appropriate credit. Sorry about that.
>
> This patch didn't fix things, it broke things.  The former guarantee
> that age's reference point would hold still throughout a transaction
> just disappeared.
>
> What I read your previous suggestion to be was that age() would keep
> local state and use inspection of the current VXID to tell if its
> cache was stale.  That would keep the fix localized (which I agree
> is a good idea) without losing the stability guarantee.

Gotcha. Will fix.

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services