Re: postmaster.pid file auto-clean up? - Mailing list pgsql-general

From Sebastien Boisvert
Subject Re: postmaster.pid file auto-clean up?
Date
Msg-id F85A1CA4-8409-410A-B363-D1392E9127FC@yahoo.com
Whole thread Raw
In response to postmaster.pid file auto-clean up?  (Sebastien Boisvert <sebastienboisvert@yahoo.com>)
Responses Re: postmaster.pid file auto-clean up?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Is this mechanism documented anywhere (besides source code)?

It looks like PG will only clean it up if there's no other process running at all on the pid listed in the
postmaster.pidfile, even if any process running on that pid isn't a PG process or there's no server running on the data
directory(as per `pg_ctl status`). 


On Aug 20 2012, at 1:31 PM, Tom Lane wrote:

> Sebastien Boisvert <sebastienboisvert@yahoo.com> writes:
>> I vaguely remember reading in the release notes (around the time 9.x was released) something about it automatically
clearingout the postmaster.pid file if it was found to be stale/invalid when starting the the database server, however
Icannot find any reference to this anymore. 
>
> It's always done that.
>
> We occasionally see startup scripts that "helpfully" remove the .pid
> file.  They are, without exception, wrong and dangerous.  The postmaster
> is much more likely to get this right by itself.
>
>             regards, tom lane
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general



pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: How hard would a "path" operator be to implement in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: postmaster.pid file auto-clean up?