Re: age(xid) on hot standby

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: age(xid) on hot standby
Дата
Msg-id 27775.1326916546@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: age(xid) on hot standby  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: age(xid) on hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
Re: age(xid) on hot standby  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On mån, 2012-01-16 at 22:59 -0300, Alvaro Herrera wrote:
>> So who's going to work on a patch?  Peter, are you?  If not, we should
>> add it to the TODO list.

> Not at this very moment, but maybe in a few weeks.

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
tocompute result ...
 

and of course code somewhere to reset age_reference_xid at end of xact.

The advantage of this is

(1) same code works on master and standby

(2) calling age() no longer requires an otherwise read-only transaction
to acquire an XID.
        regards, tom lane


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Setting -Werror in CFLAGS
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: foreign key locks, 2nd attempt