Re: Autovacuuming

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Autovacuuming
Дата
Msg-id 20060424190603.GC16134@surnet.cl
обсуждение исходный текст
Ответ на Re: Autovacuuming  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: Autovacuuming  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Autovacuuming  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-admin
Jim C. Nasby wrote:
> On Mon, Apr 24, 2006 at 08:41:55AM -0400, Alvaro Herrera wrote:
> > The test for database-wide vacuum is:
> >
> > database age > big_constant
> >
> > where:
> >
> > big_constant = (MaxTransactionId >> 3) * 3 - 100000) = 1610512733
>
> Ok, I'll bite... any idea how (MaxTransactionId >> 3) * 3 was chosen? I
> don't see anything about it in vacuum.c...

I don't remember exactly why was that constant chosen.  IIRC Tom pulled
it out of thin air.  You can see in vac_truncate_clog (vacuum.c) a
similar constant is used to emit messages about impending wraparound;
it's ((MaxTransactionId >> 3) * 3).  The one in autovacuum.c allows for
more slack.  (Which is kinda right because we want autovac to take care
of it _before_ the user sees any warning.)

> Also, maybe that should be defined in one place rather than duplicating
> it in autovacuum.c?

Hmm ... do you care enough to send a patch?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Martin Marrese
Дата:
Сообщение: Trouble with pg_dump and sequences
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: dblink not working in FC5 (Solved)