Re: BUG #13757: Able to write to postgres even when the main process has been killed

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #13757: Able to write to postgres even when the main process has been killed
Дата
Msg-id 20151106164254.GB6104@alvherre.pgsql
обсуждение исходный текст
Ответ на BUG #13757: Able to write to postgres even when the main process has been killed  (vijaysam@mailworks.org)
Список pgsql-bugs
vijaysam@mailworks.org wrote:

> But, when I try to kill -9 the master server main postgres process. The
> client code from java is able to continue to write to the postgres db which
> was the old master as there was a connection established to this server and
> the connection keeps allowing write to happen as thought the server is still
> running. I understand kill -9 is a bad thing.

Good thing that you do.  Don't do it, as it's not a proper shutdown
procedure.  There are three documented signals with varying degrees of
shutdown immediacy: SIGTERM, SIGINT, SIGQUIT.  The postmaster process
will take action to terminate server processes as appropriate if you use
those signals.  SIGKILL is entirely inappropriate.  If you would like to
use SIGKILL, you need to send it to *all* postgres processes, which will
cause a shutdown very similar in nature to SIGQUIT.

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

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: BUG #13757: Able to write to postgres even when the main process has been killed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13757: Able to write to postgres even when the main process has been killed