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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-hackers by date

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