>
>> When the XID wraps, at the moment it does so, unless you set
>> vacuum_freeze_min_age to 0 and a vacuum has just been performed, is
>> there not a chance that there will be some data loss?
>
>No. XID comparisons are modulo 2^31.
>
Thanks - I'm still trying to wrap my mind around this (sorry).
So, for the sake of this description:
- the XID space (size 2^32) is split into two sub-spaces, each of size 2^31
- each XID is quantified in terms of "space" (0,1) plus "offset" (modulo 2^31) : x(s,o)
- each db row is stamped with an "age" XID : r(s,o)
- each db query start is an XID : q(s,o)
Therefore, a query can only see rows where:
(q.o > r.o) && (q.s == r.s) || (q.o <= r.o) && (q.s != r.s)
Something like that?