Re: We should Axe /contrib/start-scripts - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: We should Axe /contrib/start-scripts
Date
Msg-id 20090826001701.GA12444@oak.highrise.ca
Whole thread Raw
In response to Re: We should Axe /contrib/start-scripts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Tom Lane <tgl@sss.pgh.pa.us> [090825 18:43]:
> How would you get the latter in a portable fashion?  (Do not mention
> ps please ... and I don't want to hear about lsof either ...)

Can postmaster keep a exclusive lock on its own pid file the entire time it's
running?  If you can open it and lock it before getting the PID out of
it, you know it's not an active postmaster...  It may be a pid that
corresponds with something else, or it may be a pid of a racing
postmaster, but since you have the exclusive lock, it's not going to get
that lock...

a.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: We should Axe /contrib/start-scripts
Next
From: Chander Ganesan
Date:
Subject: Re: We should Axe /contrib/start-scripts