Re: pid gets overwritten in OSX - Mailing list pgsql-general

From Tom Lane
Subject Re: pid gets overwritten in OSX
Date
Msg-id 23934.1020093911@sss.pgh.pa.us
Whole thread Raw
In response to Re: pid gets overwritten in OSX  (Francois Suter <dba@paragraf.ch>)
List pgsql-general
Francois Suter <dba@paragraf.ch> writes:
> Maybe there's some operation missing at shutdown. I installed
> PostgreSQL using Mark Liyanage's package. Could there be something
> missing? Is Postgres taking care of the removal of the postmaster.pid
> file or do you have to do it yourself in some shutdown script?

No, you shouldn't need to do it yourself.  The approved way to shut down
Pg is to send the postmaster a SIGTERM signal --- which I believe all
Unixen will do automatically during the shutdown sequence.  What may be
happening is that the system is not giving the postmaster a long enough
grace period between SIGTERM and hard kill.  We need a minimum of about
three seconds I believe (there's a 2-second sleep() in the checkpoint
sync code, which maybe should not be there, but it's there at the
moment).  Traditionally systems have allowed 10 seconds or more to
respond to SIGTERM, but perhaps Apple thought they could shave some
time there?

            regards, tom lane

pgsql-general by date:

Previous
From: Francois Suter
Date:
Subject: Re: pid gets overwritten in OSX
Next
From: Steve Lane
Date:
Subject: Re: Postgres utils chewing RAM