Skip site navigation (1) Skip section navigation (2)

Re: Attempt to stop dead instance can stop a random process?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Attempt to stop dead instance can stop a random process?
Date: 2007-08-31 19:18:03
Message-ID: 381.1188587883@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> It appears that when pg_ctl gets a stop request for a given directory, it l=
> ooks for a pid file in that directory and signals that pid to stop.  It doe=
> sn't appear to check that the pid is for a PostgreSQL postmaster running ou=
> t of the given directory.  I think it should, although on a quick scan of t=
> he code, I didn't see a convenient way to do that.

[ shrug... ]  AFAICS there is no way to know that.

> I have some evidence that when we attempted to stop a PostgreSQL instance w=
> hich (it turned out) had died without cleaning up the pid file, it actually=
>  stopped another instance which was using a different data directory but ha=
> d wrapped around to the same pid.

The real question there is how come the postmaster died without removing
the pidfile.  It's not that easy to crash the postmaster ...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Gregory StarkDate: 2007-08-31 19:20:20
Subject: Re: Password requirement in windows installer
Previous:From: Decibel!Date: 2007-08-31 19:12:03
Subject: Re: Password requirement in windows installer

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group