Re: age(xid) on hot standby

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-05-08T19:01:01Z
Lists: pgsql-hackers

Attachments

On ons, 2012-01-18 at 14:55 -0500, Tom Lane wrote:
> BTW, it strikes me that maybe the coding should work about like this:
> 
> 	if (!TransactionIdIsValid(age_reference_xid))
> 	{
> 		age_reference_xid = GetTopTransactionIdIfAny();
> 		if (!TransactionIdIsValid(age_reference_xid))
> 			age_reference_xid = ReadNewTransactionId();
> 	}
> 	... use age_reference_xid to compute result ...
> 
> and of course code somewhere to reset age_reference_xid at end of xact.

How about this patch?