> Not initdb, but postmaster. That's the one who tries (after a
> successful initdb) to do the fcntl(F_SETLK) on the unix
> domain socket. Causing the kernel saying "go to hell, go
> directly, don't write a core, don't leave useful info in
> gdb".
>
> The only reason I see for the entire section is to detect if
> it would be safe to unlink the socket because it's left by
> another postmaster in case of abnormal termination. Tell me
> if I've misread it. So why not doing it on the Linux
> platform different, using a separate file like
> .s.PGSQL.5432.LCK?
But how do you know if that file still belongs to an active postmaster?
What if it exited before removing the file. Seems we would have to
write the PID into the file, and do a kill() to see if it is running.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026