Re: Bug in autovacuum.c?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in autovacuum.c?
Дата
Msg-id 345.1301777806@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug in autovacuum.c?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Bug in autovacuum.c?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Apr 1, 2011 at 5:48 PM, Bruce Momjian <bruce@momjian.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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Another swing at JSON
Следующее
От: Tom Lane
Дата:
Сообщение: Re: psql 9.1 alpha5: connection pointer is NULL