Re: Bug with pg_ctl -w/wait and config-only directories

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug with pg_ctl -w/wait and config-only directories
Дата
Msg-id 19287.1317826101@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug with pg_ctl -w/wait and config-only directories  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On tis, 2011-10-04 at 17:49 -0400, Tom Lane wrote:
>> As of fairly recently, the Fedora package also uses pg_ctl for both
>> starting and stopping.  We've fixed all the reasons that formerly
>> existed to avoid use of pg_ctl, and it's a real PITA to try to
>> implement the waiting logic at shell level.

> Well, it's debatable whether an init script should actually do any
> waiting.  I'm not saying that what you are doing is wrong, but it
> depends on local policy and conventions.  I maintain some unrelated init
> scripts in Debian and have gotten occasional hell from users for holding
> up the boot process even a bit while waiting for the service to become
> fully operational.  A restart of a failing PostgreSQL server can take
> minutes; I don't want to think about how that would be received. :-/
> Considering how much work people are putting into speeding up the boot
> process in Linux distributions at the moment, with upstart, systemd
> etc., it's not clear to me that the waiting feature is a required
> behavior.

Well, actually, it wasn't until Fedora went to systemd that I could
sanely use "pg_ctl start -w".  In SysV initscripts, you're right,
waiting indefinitely for the DB server to come up is not tenable.
But in systemd, there is no serialization of services and it's better
if systemd is aware that the service isn't fully started yet.
In particular, with this implementation, somebody can put "After:
postgresql.service" in their unit file and be sure that the DB will be
ready when their service starts.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug with pg_ctl -w/wait and config-only directories
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug with pg_ctl -w/wait and config-only directories