Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [GENERAL] (Never?) Kill Postmaster?

From: Tom Lane <tgl(at)sss.pgh.pa.us>
Date: Wed Oct 24 2007 - 08:01:13 EDT


"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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend Received on Wed Oct 24 08:04:58 2007

This archive was generated by hypermail 2.1.8 : Mon Jun 16 2008 - 18:46:30 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library