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

Re: Bug in autovacuum.c?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in autovacuum.c?
Date: 2011-04-01 14:00:58
Message-ID: 201104011400.p31E0w511378@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Greg Stark wrote:
> On Thu, Mar 31, 2011 at 10:59 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > OK, just keep going below 100:
> >
> > ? ? ? ?105 -> 5
> > ? ? ? ?104 -> 4
> > ? ? ? ?103 -> 3
> > ? ? ? ?102 -> max_xid
> > ? ? ? ?101 -> max_xid - 1
> > ? ? ? ?100 -> max_xid - 2
> > ? ? ? ? 99 -> max_id
> > ? ? ? ? 98 -> max_id -1
> 
> Yeah, I think this is what the code is doing.
> 
> >
> > Wouldn't you rather:
> >
> > ? ? ? ?105 -> 5
> > ? ? ? ?104 -> 4
> > ? ? ? ?103 -> 3
> > ? ? ? ?102 -> 3
> > ? ? ? ?101 -> 3
> > ? ? ? ?100 -> 3
> > ? ? ? ? 99 -> max_id
> > ? ? ? ? 98 -> max_id -1
> >
> 
> I think I would expect
> 
> > ? ? ? ?105 -> 5
> > ? ? ? ?104 -> 4
> > ? ? ? ?103 -> 3
> > ? ? ? ?102 -> max_id
> > ? ? ? ?101 -> max_id-1
> > ? ? ? ?100 -> max_id-2
> > ? ? ? ? 99 -> max_id-3
> 
> But it doesn't really matter either way, does it? We don't even allow
> setting vacuum_max_freeze_age to 2^31-1 or any value that would be
> close to triggering a problem here.

It doesn't need to be that high because it is subtracted from the
current xid counter, so if vacuum_max_freeze_age is 100, and the xid
counter is 101, we see the problem.

-- 
  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

pgsql-hackers by date

Next:From: Rushabh LathiaDate: 2011-04-01 14:01:10
Subject: Re: edb-postgres.exe has encountered a problem on windows
Previous:From: Heikki LinnakangasDate: 2011-04-01 14:00:49
Subject: Re: edb-postgres.exe has encountered a problem on windows

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