Re: age(xid) on hot standby

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: age(xid) on hot standby
Date: 2012-01-16 15:27:03
Message-ID: 24232.1326727623@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Peter Eisentraut's message of dom ene 15 10:00:03 -0300 2012:
>> On ons, 2011-12-28 at 14:35 -0500, Tom Lane wrote:
>>> The trouble with using ReadNewTransactionId is that it makes the results
>>> volatile, not stable as the function is declared to be.

>> Could we alleviate that problem with some caching within the function?

> Maybe if we have it be invalidated at transaction end, that could work.
> So each new transaction would get a fresh value.

Yeah, I think that would work.

> If you had a long
> running transaction the cached value would get behind, but maybe this is
> not a problem or we could design some protection against it.

Nobody has complained about the fact that age()'s reference point
remains fixed throughout a transaction on the master, so I don't see why
we'd not be happy with that behavior on a standby.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-01-16 15:43:41 Re: reprise: pretty print viewdefs
Previous Message Alvaro Herrera 2012-01-16 15:23:52 inconsistent comparison of CHECK constraints