Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files
Date
Msg-id 27585.975199312@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Maybe we could name the socket file .s.PGSQL.port.pid and make
> .s.PGSQL.port a symlink.  Then you can find out whether the postmaster
> that created the file is still running.

Or just create a lockfile /tmp/.s.PGSQL.port#.lock, ie, same name as
socket file with ".lock" added (containing postmaster's PID).  Then we
could share code with the data-directory-lockfile case.

> Actually, this turns out to be similar to what you wrote in
> http://www.postgresql.org/mhonarc/pgsql-hackers/1998-08/msg00835.html

Well, we've talked before about moving the socket files to someplace
safer than /tmp.  The problem is to find another place that's not
platform-dependent --- else you've got a major configuration headache.

> But we really should be fixing the IPC interlock with IPC_EXCL, but the
> code changes look to be non-trivial.

AFAIR the previous thread, it wasn't that bad, it was just a matter of
someone taking the time to do it.  Maybe I'll have a go at it...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: tcl/FreeBSD 4.2-STABLE, multiple TCL versions installed
Next
From: Larry Rosenman
Date:
Subject: Re: tcl/FreeBSD 4.2-STABLE, multiple TCL versions installed