Re: Bug in autovacuum.c?

Greg Stark <gsstark@mit.edu>

From: Greg Stark <gsstark@mit.edu>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@commandprompt.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-04-01T01:54:12Z
Lists: pgsql-hackers
On Thu, Mar 31, 2011 at 10:59 PM, Bruce Momjian <bruce@momjian.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.


-- 
greg