<br /><blockquote type="CITE"><pre>
<font color="#000000">We already have two platforms that don't use the SysV semaphore</font>
<font color="#000000">interface, and even on ones that have it, I wouldn't want to assume they</font>
<font color="#000000">all support SEM_UNDO.</font>
</pre></blockquote> Which platforms, just out of curiousity? I assume that Win32 is one of them.<br /><br
/><blockquotetype="CITE"><pre>
<font color="#000000">But aside from any portability issues, ISTM this would have its own</font>
<font color="#000000">failure modes. In particular you still have to rely on a pid-file</font>
<font color="#000000">(only now it's holding a semaphore ID not a PID)</font>
</pre></blockquote> You've lost me... why would you store the semid and <i>not</i> the pid? I was thinking that the
semidmight be a postgresql.conf thingie.<br /><br /><blockquote type="CITE"><pre>
<font color="#000000"> and there's still</font>
<font color="#000000">a bit of a leap of faith required to get from the observation that</font>
<font color="#000000">somebody is holding a lock on semaphore X to the conclusion that that</font>
<font color="#000000">somebody is a conflicting postmaster. </font>
</pre></blockquote> Isn't that sort of like saying that if a postmaster.pid file exists, it must have been written by a
postmaster? Pick a semaphore id and dedicate it to postmaster exclusion. <br /><br /><blockquote type="CITE"><pre>
<font color="#000000">It doesn't look to me like this</font>
<font color="#000000">is any better than the PID solution, really, as far as false positives</font>
<font color="#000000">go. </font>
</pre></blockquote><br /> As long as the kernel cleans up SEM_UNDO semaphores, I guess I don't see have you would have
afalse positive. Oh, I guess I should say that is you use a SEM_UNDO semaphore, you don't need the pid check anymore.
And,no worry about NFS.<br /><br /><blockquote type="CITE"><pre>
<font color="#000000">As for false negatives: ipcrm.</font>
</pre></blockquote> Yes, that's a problem, but I think it's the same as "rm postmaster.pid", isn't it?<br /><br />