Re: pg_autovacuum next steps

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_autovacuum next steps
Дата
Msg-id 8518.1079991523@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_autovacuum next steps  (Gavin Sherry <swm@linuxworld.com.au>)
Ответы Re: pg_autovacuum next steps  ("Matthew T. O'Connor" <matthew@zeut.net>)
Список pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> So, do we want a static time, a GUC controlled time or some time which is
> modified by pg_autovacuum's/stat's collector's knowledge of the amount of
> work which goes on in any given database?

From the point of view of the postmaster a GUC-controlled delay would
seem like the best thing.  We could discuss having the autovacuum code
try to feed back adjustments in the delay, but remember that one of the
golden virtues for the postmaster proper is simplicity; that translates
directly to robustness.  We don't want the postmaster engaging in
anything complicated that could potentially lock it up or crash it due
to a bug.

Possibly this point could be finessed by a two-level structure, that is,
postmaster launches autovacuum daemon (which is not itself a backend)
and that in turn launches backends to do the real per-database work.
The postmaster's only subsequent involvement is restarting the autovac
daemon if it dies.  The autovac daemon can be as complex as you want.

This nice-sounding arrangement is probably not directly workable because
of the fact that the postmaster has no good way to know about or control
backends if they aren't its direct children.  Perhaps the autovac daemon
*should* use libpq, that is, not fork backends but connect via the
postmaster each time it wants to run a backend.  Then the backends are
ordinary children of the postmaster and everything acts normally.
(This could amount to using the existing autovac code, and simply adding
a frammish to the postmaster to autospawn the autovac daemon as a
non-backend child process.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Thoughts about updateable views
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: pg_autovacuum next steps