Re: stopping server does not remove external_pid_file

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>, Martin Pitt <martin(at)piware(dot)de>
Subject: Re: stopping server does not remove external_pid_file
Date: 2006-06-07 23:04:24
Message-ID: 20060607230424.GI45331@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jun 06, 2006 at 11:32:53PM -0400, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Doesn't removing the file reduce the chances of failing to start later
> > in case another postmaster already has that pid?
>
> No, because the external pidfile has zero to do with Postgres' internal
> behavior.
>
> Personally I always thought that the external pidfile was a "feature"
> we should have rejected. It can never be a particularly reliable guide
> to what PG is doing, the more especially so if the program looking at it
> isn't doing any cross-checking, as the OP seems not to be doing.

Has anyone considered allowing $PGDATA to be mode 701 and our pid file
being 644? ISTM that would remove the need for external_pid_file, though
of course people would still need to do the same kinds of checking.

Even if they do need to do the checking though, ISTM it'd be better to
remove the external PID file on shutdown...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2006-06-07 23:09:49 Re: stopping server does not remove external_pid_file
Previous Message Bruce Momjian 2006-06-07 17:20:27 Re: reindexdb command utlility