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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value
Дата
Msg-id 6274.1336752803@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> Ensure age() returns a stable value rather than the latest value

Hm.  This fixes the stability-within-transaction problem, but it's also
introduced a change in the definition of age(), no?  Previously, in an
xact that had an XID, the age was measured relative to that XID.
I'm not sure that we should lightly abandon that correspondence.
At the very least we would need to update the user-facing documentation,
not only the function's header comment.  So far as I can find, the only
such documentation is the pg_description entry:
DESCR("age of a transaction ID, in transactions before current transaction");
but that's still wrong now.

The definition I was thinking of was "if xact has an XID use that, else
do ReadNewTransactionId, and in either case save the value for later
calls during the current virtual xact."  This is more complicated than
what you implemented, and maybe we shouldn't be quite that tense about
backwards-compatibility.  But I don't think we should be changing the
function's definition like you've done in back branches.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: incorrect handling of the timeout in pg_receivexlog
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PL/perl elog(ERROR) Does not Abort Transaction