Re: putting a bgworker to rest

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: putting a bgworker to rest
Дата
Msg-id 20130425160553.GS2169@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: putting a bgworker to rest  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> On 4/24/13 12:30 PM, Dimitri Fontaine wrote:
> > In Erlang, the lib that cares about such things in called OTP, and that
> > proposes a model of supervisor that knows when to restart a worker. The
> > specs for the restart behaviour are:
> >
> >   Restart = permanent | transient | temporary
>
> There is also supervisord; see configuration settings "autorestart" and
> "exitcodes" here:
>
> http://supervisord.org/configuration.html#program-x-section-settings
>
> Yes, the feature creep is in full progress!

The main missing feature before this can be sensibly implemented, in my
view, is some way to make workers start when they are stopped, assuming
no intervening postmaster crash.  I suppose we could write a
SQL-callable function so that a backend can signal postmaster to launch
a worker.  For this to work, I think we need an SQL-accesible way to
list existing registered workers, along with whether they are running or
not, and some identifier.  However, the list of registered workers and
their statuses currently only exists in postmaster local memory;
exporting that might be problematic.  (Maybe a simple file with a list
of registered workers, but not the status, is good enough. Postmaster
could write it after registration is done.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Failing start-up archive recovery at Standby mode in PG9.2.4
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: danger of stats_temp_directory = /dev/shm