autovacuum bootstrap

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема autovacuum bootstrap
Дата
Msg-id 20050625182352.GA7410@surnet.cl
обсуждение исходный текст
Ответы Re: autovacuum bootstrap  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hackers,

There's one problem with autovacuum and it's how to bootstrap it.

My current approach is to connect to a default hardcoded database :-)  
so it has to be changed to be useful.

I added two new fields to the pg_database flatfile and table, datstats
and datautovac.  They respectively signal the stat collector and
autovacuum daemon to run for that database.

Additionally I need to save some state during initdb for each database,
and during database creation (and when the hypotetical ALTER DATABASE
command for turning autovacuum on is executed).  I'm thinking in storing
that state in additional flat files.  The reason is that we need to
examine the state of all databases before deciding which one to connect
to.  I don't want to use the pg_database file, because that'd make me
check for race conditions against created or dropped databases; the new
flatfile would only need to interlock against autovac processes (which
is trivial because only one autovac process runs at any time.)

Does anyone see a problem with this approach?


PS -- it would definitely be much easier if there was one autovac
process per database :-(

-- 
Alvaro Herrera (<alvherre[a]surnet.cl>)
"El realista sabe lo que quiere; el idealista quiere lo que sabe" (Anónimo)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: get_rel_* functions in lsyscache.c
Следующее
От: Tom Lane
Дата:
Сообщение: Fundamental error in "no WAL log" index/file creation stuff