Re: How to shoot yourself in the foot: kill -9 postmaster - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to shoot yourself in the foot: kill -9 postmaster
Date
Msg-id 3804.983847185@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to shoot yourself in the foot: kill -9 postmaster  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-hackers
Lamar Owen <lamar.owen@wgcr.org> writes:
> The last thing I want to do is
> wait too long on some platforms and not long enough on others.

The difficulty is to know how long the final checkpoint will take.
This depends on (at least) your hard disk speed and the number of
dirty buffers, so I think you're going to have some difficulty
estimating it with any reliability.  BogoMIPS won't help, for sure.

However, if you do SIGINT and then wait a few seconds, you can be fairly
sure that all the extant backends are dead (if not frozen up...) and
that the checkpoint is in progress.  That may be about the best you can
do.

I do not agree that this script should take it on itself to kill -9 the
postmaster.  Please note that the reason we're having this discussion at
all is that the init script may be used for purposes other than system
shutdown.  So the argument that "it's going to happen anyway" is wrong.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: pg_dump scripts are no longer ordinary-user friendly
Next
From: Bruce Momjian
Date:
Subject: Re: How to shoot yourself in the foot: kill -9 postmaster