Search Postgresql Archives

Re: XID comparations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Carlos H. Reimer" <carlosreimer@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux