Re: Strange pg_ctl behavior: postmaster shuts down on shell interrupt

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strange pg_ctl behavior: postmaster shuts down on shell interrupt
Дата
Msg-id 16809.1159649371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Strange pg_ctl behavior: postmaster shuts down on shell interrupt  ("smartdude" <in4tunio@gmail.com>)
Список pgsql-general
"smartdude" <in4tunio@gmail.com> writes:
> We use postgres 8.0.4 for our application on Linux ES3 kernel 2.4.21-4.
> We wrote a small shell script for starting postgres, which does little
> more than just calling postmaster. We trap interrupt signal in the
> shell script to allow postgres to start even if interrupted by the
> user.

"trap" only sets the shell's response to signals, not that of programs
started by the shell.  You're going at this entirely the wrong way:
what you need is to make sure the postmaster is dissociated from your
terminal so it doesn't get signals from the keyboard in the first place.
I believe what you need to add is a "-l logfile" option to the pg_ctl
call so that the postmaster's stdout gets disconnected from the
terminal.

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: alter integer field to serial integer primary key
Следующее
От: Tom Lane
Дата:
Сообщение: Re: dropdb cmd line args