RES: [GENERAL] XID comparations

2006-06-13 Thread Carlos H. Reimer
Thanks, In my first question I would like to use xmin instead of cmin, even so I could understand the logic. Then for each XID you have 2 bilions XIDs that are considered lower than and the other 2 bi higher than. About row visibility: are all the rows with xmin higher than my XID be considered

Re: [GENERAL] XID comparations

2006-06-13 Thread Martijn van Oosterhout
On Tue, Jun 13, 2006 at 12:10:26PM -0300, Carlos H. Reimer wrote: > When xid overflows (32 bits) the next one will be 3 (1 and 2 are reserved). > > In this case, we could have have lines with cmin 4.294.967.295 and lines > with cmin 3. How are they compared to determine that > rows with cmin 3 are

Re: [GENERAL] XID comparations

2006-06-13 Thread Tom Lane
"Carlos H. Reimer" <[EMAIL PROTECTED]> 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 wor

[GENERAL] XID comparations

2006-06-13 Thread Carlos H. Reimer
Hi, I would like to understand better the logic to determine when a xid is older than another one. As I could understand, the XID is always incremented, never reset. If it is true, then we can have rows with cmin ranging from 1 to 4.294.967.295 (2^32-1). When xid overflows (32 bits) the next one