Skip site navigation (1) Skip section navigation (2)

Re: Bug in autovacuum.c?

From: Jim Nasby <jim(at)nasby(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in autovacuum.c?
Date: 2011-04-01 21:59:40
Message-ID: D9F4A89E-4EB2-4B4C-B0A4-E9E2144BDC22@nasby.net (view raw or flat)
Thread:
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(at)nasby(dot)net
512.569.9461 (cell)                         http://jim.nasby.net



In response to

pgsql-hackers by date

Next:From: Jim NasbyDate: 2011-04-01 22:15:55
Subject: Re: Lock problem with autovacuum truncating heap
Previous:From: Bruce MomjianDate: 2011-04-01 21:52:49
Subject: Re: Bug in autovacuum.c?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group