Re: stopping server does not remove external_pid_file - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: stopping server does not remove external_pid_file
Date
Msg-id 200606070325.k573PhX27757@candle.pha.pa.us
Whole thread Raw
In response to Re: stopping server does not remove external_pid_file  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: stopping server does not remove external_pid_file
List pgsql-bugs
Tom Lane wrote:
> Euler Taveira de Oliveira <euler@timbira.com> writes:
> > Martin Pitt wrote:
> >> I just played around with external_pid_file in 8.1.4. I noticed that
> >> the file is created and filled properly, but it is not removed again
> >> when the server is stopped.
> >>
> > Looking at the code I see this comment in
> > src/backend/postmaster/postmaster.c
>
> > /* Should we remove the pid file on postmaster exit? */
>
> > IMHO, yes. It's not useful anymore.
>
> [ shrug... ]  If the postmaster crashes, it would certainly fail to
> remove the pidfile.  So I'd argue that your unnamed external script
> that is expecting the pidfile to go away needs work: if it's not
> verifying the PID given in the file, it's broken.

Doesn't removing the file reduce the chances of failing to start later
in case another postmaster already has that pid?  Why do we keep it
around?

--
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: stopping server does not remove external_pid_file
Next
From: Tom Lane
Date:
Subject: Re: stopping server does not remove external_pid_file