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

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value
Дата
Msg-id CA+U5nMLUDPr3Tx_oHJZnLG0YNpDx0f_E-n=dQfLSPYAFqh+TbA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 12 May 2012 15:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.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.

As you said yourself, assigning an XID is exactly the same as using
ReadNewTransactionId(). There is no difference in behaviour for case
2.

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


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Ensure age() returns a stable value rather than the latest value