From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | 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:54:15 |
Message-ID: | 201103311854.p2VIsFw08500@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> > That would probably work, but the existing coding actually makes more
> > sense. It's essentially trying to scan backwards by
> > autovacuum_freeze_max_age XIDs through the circular XID space. But
> > the XID space isn't actually circular, because there are 3 special
> > values. So if we land on one of those values we want to skip backward
> > by 3. Here FirstNormalTransactionId doesn't represent itself, but
> > rather the number of special XIDs that exist.
>
> 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.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-03-31 18:55:20 | Re: Problem with pg_upgrade? |
Previous Message | Brendan Jurd | 2011-03-31 18:46:14 | Re: [HACKERS] Date conversion using day of week |