Re: XID comparations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: XID comparations
Дата
Msg-id 23805.1150213206@sss.pgh.pa.us
обсуждение исходный текст
Ответ на XID comparations  ("Carlos H. Reimer" <carlosreimer@terra.com.br>)
Список pgsql-general
"Carlos H. Reimer" <carlosreimer@terra.com.br> writes:
> I would like to understand better the logic to determine when a xid is older
> than another one.

It's circular mod 2^32, with a special case for FrozenXID.  It's a
mistake to imagine that XIDs are unsigned ints, really --- the
comparison doesn't work that way.  For an XID of say 1billion, XIDs from
1billion to 3billion are "after", the rest "before".  So once a row
is created, it has to be deleted or frozen within 2 billion
transactions, else its XID wraps around and appears to be "in the
future" rather than "in the past" compared to current XIDs.

            regards, tom lane

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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: Fabian Pascal and RDBMS deficiencies in fully
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: XID comparations