Re: [HACKERS] typo: XIDs are actually compared using modulo-2^32 arithmetic

2013-12-14 Thread Greg Stark
I don't have a source tree handy but iirc we treaty 2^31 values as being in the past and 2^31 values as being in the future. I've been trying to think how to protect better against the recent vacuum freeze bug. If someone ruins vacuum freeze now and has any wrapped values they'll destroy their

Re: [HACKERS] typo: XIDs are actually compared using modulo-2^32 arithmetic

2013-12-14 Thread Andres Freund
On 2013-12-14 20:19:11 +, Greg Stark wrote: I don't have a source tree handy but iirc we treaty 2^31 values as being in the past and 2^31 values as being in the future. I've been trying to think how to protect better against the recent vacuum freeze bug. If someone ruins vacuum freeze

Re: [HACKERS] typo: XIDs are actually compared using modulo-2^32 arithmetic

2013-12-12 Thread Tom Lane
Gianni Ciolli gianni.cio...@2ndquadrant.it writes: It seems there is a typo here: http://www.postgresql.org/docs/devel/static/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND where we say that we compare XIDs using arithmetic modulo 2^31, which should instead be 2^32 (as it is with uint32,