Re: Possible better pg_ctl start/stop handling? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Possible better pg_ctl start/stop handling?
Date
Msg-id 11242.1121108667@sss.pgh.pa.us
Whole thread Raw
In response to Re: Possible better pg_ctl start/stop handling?  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Possible better pg_ctl start/stop handling?
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> I was just wondering if we could make pg_ctl a little smarter as all.
> If pg_ctl can't start because the pid file exists, test for the 
> existence of the pid, if the pid does not exist test for the existence
> of **any** postgres process (grep? egad...), if none exists overwrite 
> the pid file and start?

This cannot be any smarter than the existing test in the postmaster,
and is most likely to be much stupider.


>> How did you get into this state anyway?

> Power off on a dev machine ;)

Does the dev machine run more than one postmaster?  I've occasionally
seen similar issues when restarting a clutch of dev postmasters ---
the kernel may assign a shmem id to one of them that belonged to another
one in the previous cycle, and if you already started that other one
then the second gets confused.  8.0 and up have a test that should deal
correctly with this; what version did you see failing exactly?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Possible better pg_ctl start/stop handling?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Possible better pg_ctl start/stop handling?