Re: Bug in autovacuum.c?
Jim Nasby <jim@nasby.net>
From: Jim Nasby <jim@nasby.net>
To: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-04-01T21:59:40Z
Lists: pgsql-hackers
On Apr 1, 2011, at 4:48 PM, Bruce Momjian wrote: > I am not so concerned about this case but about other cases where we are > computing xid distances across the invalid range. Bruce, I think you hit the nail on the head earlier: > To do the right thing every computation that passes over the xid > wraparound bounary should subtract FirstNormalTransactionId, not just > those that fall in the boundry. Put another way: XID calculations should not use just +/-, but an operator (presumably a macro) that understands wraparound and the special values. Surely we have a similar problem in the code that increments XIDs, and possibly other places as well. -- Jim C. Nasby, Database Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net