Skip site navigation (1) Skip section navigation (2)

Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files
Date: 2000-11-26 00:41:52
Message-ID: 27585.975199312@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Larry RosenmanDate: 2000-11-26 00:53:29
Subject: Re: tcl/FreeBSD 4.2-STABLE, multiple TCL versions installed
Previous:From: Larry RosenmanDate: 2000-11-26 00:39:33
Subject: Re: tcl/FreeBSD 4.2-STABLE, multiple TCL versions installed

pgsql-general by date

Next:From: robDate: 2000-11-26 00:52:13
Subject: Integrity Relationships
Previous:From: Peter EisentrautDate: 2000-11-26 00:28:14
Subject: Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group