Re: putting a bgworker to rest

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: putting a bgworker to rest
Дата
Msg-id CA+TgmoapsJTask11K_wx4vMF2yZyagKS8OOXdDcQhCKaKEEF2A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: putting a bgworker to rest  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Tue, Apr 23, 2013 at 1:22 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> So a "done" worker would never be restarted, until postmaster sees a
>> crash or is itself restarted?  I guess that'd be useful for workers
>> running during recovery, which terminate when recovery completes.  Is
>> that your use case?
>
> Well, its not actual postgres recovery, but something similar in the
> context of logical replication.

It's probably too late to be twiddling this very much more, but
another thing I think would be useful is for backends to have the
ability to request that the postmaster start a worker of type xyz,
rather than having the server start it automatically at startup time.
That's what you'd need for parallel query, and there might be some
replication-related use cases for such things as well.  The general
usage pattern would be:

- regular backend realizes that it needs help
- kicks postmaster to start a helper process
- helper process runs for a while, doing work
- helper process finishes work, maybe waits around for some period of
time to see if any new work arrives, and then exits
- eventually go back to step 1

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: 9.3 Beta1 status report
Следующее
От: David Fetter
Дата:
Сообщение: Examples Re: Bug Fix: COLLATE with multiple ORDER BYs in aggregates