Re: Autovacuum loose ends

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Autovacuum loose ends
Дата
Msg-id 20050722225432.GA2734@alvh.no-ip.org
обсуждение исходный текст
Ответ на Autovacuum loose ends  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Autovacuum loose ends
Список pgsql-hackers
On Thu, Jul 14, 2005 at 10:52:56AM -0400, Tom Lane wrote:

Hey,

> * Or actually, it would vacuum template0, except that since no regular
> backend ever connects to template0, there will be no stats DB entry for
> it and so the loop in AutoVacMain will ignore it.  This is definitely
> BAD as it means that a database that's not been touched since postmaster
> start will never be vacuumed, not even for XID wraparound prevention.
> That test needs to be weakened.

I've hacked the whole thing enough that I fixed most of the issues.
However this one I don't know how to handle.  What I need to do is
compare each database's frozen Xid with the current transaction Id.
I can get the frozenxid from the flatfile -- however I don't have
anything with which to compare it.  I tried ReadNewTransactionId(), but
it doesn't work because it tries to acquire a LWLock, which isn't
possible because we don't have a PGPROC before connecting to a database.

I guess I could the Xid from pg_control.  This seems unclean however.
Opinions about doing that?  Better ideas?

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"Crear es tan difícil como ser libre" (Elsa Triolet)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: A Guide to Constraint Exclusion (Partitioning)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Checkpoint cost, looks like it is WAL/CRC