Re: bg worker: patch 1 of 6 - permanent process

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: bg worker: patch 1 of 6 - permanent process
Дата
Msg-id AANLkTikeh0eoX7pUqv7XvR4upJkucd5diDS8BqfJcU-w@mail.gmail.com
обсуждение исходный текст
Ответ на bg worker: patch 1 of 6 - permanent process  (Markus Wanner <markus@bluegap.ch>)
Ответы Re: bg worker: patch 1 of 6 - permanent process  (Robert Haas <robertmhaas@gmail.com>)
Re: bg worker: patch 1 of 6 - permanent process  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
On Tue, Jul 13, 2010 at 11:31 PM, Markus Wanner <markus@bluegap.ch> wrote:
> This patch turns the existing autovacuum launcher into an always running
> process, partly called the coordinator. If autovacuum is disabled, the
> coordinator process still gets started and keeps around, but it doesn't
> dispatch vacuum jobs.

I think this part is a reasonable proposal, but...

> The coordinator process now uses imessages to communicate with background
> (autovacuum) workers and to trigger a vacuum job.
> It also adds two new controlling GUCs: min_spare_background_workers and
> max_spare_background_workers.

Other changes in the patch doesn't seem be always needed for the purpose.
In other words, the patch is not minimal.
The original purpose could be done without IMessage.
Also, min/max_spare_background_workers are not used in the patch at all.
(BTW, min/max_spare_background_*helpers* in postgresql.conf.sample is
maybe typo.)

The most questionable point for me is why you didn't add any hook functions
in the coordinator process. With the patch, you can extend the coordinator
protocols with IMessage, but it requires patches to core at handle_imessage().
If you want fully-extensible workers, we should provide a method to develop
worker codes in an external plugin.

Is it possible to develop your own codes in the plugin? If possible, you can
use IMessage as a private protocol freely in the plugin. Am I missing something?

--
Itagaki Takahiro


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Backups from the standby (Incrementally Updated Backups), open item
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bg worker: patch 1 of 6 - permanent process