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

Re: Bug in autovacuum.c?

From: Bruce Momjian <bruce(at)momjian(dot)us>
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-03-31 18:59:38
Message-ID: 201103311859.p2VIxcU09117@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Bruce Momjian wrote:
> > Yeah, I think this change would have the effect of moving the freeze
> > limit by one (or two?) counts.  Given the moving nature of values
> > returned by ReadNewTransactionId this would probably have no practical
> > effect.  Still, the code as is seems more natural to me (Tom wrote this
> > bit IIRC, not me).
> 
> I am now thinking the code is correct --- it maps values from 0 to
> FirstNormalTransactionId into the top of the (unsigned) xid range. 
> Unless someone objects, I will add a C comment about this behavior so
> future readers are not confused.

OK, now I think it is wrong.   :-)

The effect is to map max xid + 1 to max xid -
FirstNormalTransactionId(3) + 1, which makes the xid look like it is
going backwards, less than max xid --- not good.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-03-31 19:06:53
Subject: Re: SSI bug?
Previous:From: Bruce MomjianDate: 2011-03-31 18:55:20
Subject: Re: Problem with pg_upgrade?

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