Re: (Never?) Kill Postmaster?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: (Never?) Kill Postmaster?
Дата
Msg-id 29385.1193227273@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: (Never?) Kill Postmaster?  ("Michael Harris" <michael.harris@ericsson.com>)
Ответы Re: (Never?) Kill Postmaster?  (Christian Schröder <cs@deriva.de>)
Список pgsql-general
"Michael Harris" <michael.harris@ericsson.com> writes:
> The tip is ''kill -9' the postmaster', which has two important
> differences to the scenario I just described:
> 1) kill -9 means the OS kills the process without allowing it to clean
> up after itself
> 2) The postmaster is the master postgresql backend process. If you want
> to kill a single query you would not want to kill that.

Right: the tip is to not kill -9 the parent process; it's not saying
anything about child server processes.

If you've got a child process that's unresponsive to SIGINT then you
can send it a SIGKILL instead; the downside is that this will force a
restart of the other children too, that is you're interrupting all
database sessions not only the one.  But Postgres will recover
automatically and I don't think I've ever heard of anyone getting data
corruption as a result of such a thing.

SIGKILL on the parent is an entirely different thing.  You'll have to
manually restart Postgres, possibly do some manual cleanup, and there's
a small but nonzero chance of ensuing data corruption ... especially if
you fat-finger any of the manual steps.  Plus there simply isn't any
good reason to do it.  The postmaster should always respond to more
gentle shutdown signals, because it doesn't run any user-provided
commands that could send it off into the weeds.

Hence the TIP.

            regards, tom lane

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: deadlock detected, only selects (not select-for-update)
Следующее
От: João Paulo Zavanela
Дата:
Сообщение: Install plJava