Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(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-12 14:55:12
Message-ID: 6151.1336834512@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> Case (2) is more complex than described. If we use XID always, then
> the so-say stable value could change mid way through a scan when the
> XID is assigned and would provide neither a stable, sensible nor a
> backwards compatible response.

No, that's entirely wrong. The original behavior of the function
for case 2, which I am proposing we revert to, is that it would
forcibly assign an XID when the transaction didn't already have one.
Subsequently, that value would be stable for the duraction of the xact.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2012-05-12 16:31:14 Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value
Previous Message Hiroshi Saito 2012-05-12 13:25:43 psqlodbc - psqlodbc: add change history.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-05-12 16:31:14 Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value
Previous Message Kevin Grittner 2012-05-12 14:37:21 Re: libpq URL syntax vs SQLAlchemy