Re: How to implement autostart of postgres?

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: How to implement autostart of postgres?
Дата
Msg-id 4E2778F1.7070704@hogranch.com
обсуждение исходный текст
Ответ на How to implement autostart of postgres?  ("Gavrina, Irina" <igavrina@mera.ru>)
Список pgsql-general
On 07/20/11 4:02 AM, Gavrina, Irina wrote:
> I’ve faced with the following problem: I’m trying to implement the auto start of postgres. My way is to use inittab:
> pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster
> -D/usr/local/pgsql/data>>  /usr/local/pgsql/server.log 2>&1" /dev/null
> But this approach does not work as I wished in case of the postmaster process dies - it can not be restarted until
allchild processes are stopped. AndI have to  do it manually. 
> Is there any way to implement autostart of postgres after the postmaster process dies?
> Probably there is a configuration if the postmaster process dies all child processes are killed?  But I can find
nothinglike this in documentation. 
>
> Or maybe there is another solution to implement auto start of
> postgres? Any help are very appreciated.
>

I'd use

/bin/su - postgres -c "/usr/local/pgsql/bin/pg_ctl-D/usr/local/pgsql/data start"


for whatever thats worth...

--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Book
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Book