From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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-05-07 19:29:28 |
Message-ID: | 201105071929.p47JTSK04667@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Fri, Apr 1, 2011 at 5:48 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >> Agreed it is not worth it but I think we should at least C comment
> >> something. I think at a minimum we should set it to
> >> FirstNormalTransactionId.
>
> > I think you should leave it well enough alone.
>
> Yes. The point of the existing coding is to ensure that we don't
> overestimate the table age at which vacuums should be forced.
> Bruce's proposed change would move the inaccuracy in the wrong
> direction, and thus cause some cases to not force autovac though an
> exact calculation would have done so. It's not worth trying to be
> exactly correct here, but I don't think that we want to err in
> that direction.
>
> If we had a symbol for the max normal XID, we could instead code
> like this:
>
> if (xidForceLimit < FirstNormalTransactionId)
> xidForceLimit = LastNormalTransactionId;
>
> But AFAIR we don't, and I don't especially want to introduce one,
> because people might be misled by it. As you mentioned earlier,
> the XID space is circular so there isn't really a "last" XID.
Sorry for the late reply but it seems HighestNormalTransactionId might
be an apporopriate name. However, it is not code I normally deal with
so unless someone who works in this area wants to make this cleanup, I
will ignore the issue.
--
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 | Josh Kupershmidt | 2011-05-07 19:40:35 | psql describe.c cleanup |
Previous Message | Christopher Browne | 2011-05-07 18:16:46 | Re: [HACKERS] Re: New Canadian nonprofit for trademark, postgresql.org domain, etc. |