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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers