Re: Sure enough, the lock file is gone - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Sure enough, the lock file is gone
Date
Msg-id 4006.980545752@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sure enough, the lock file is gone  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Sure enough, the lock file is gone
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Bruce Momjian writes:
>> If we have to do it, let's make it an #ifdef __linux__ option.

> What does Linux have to do with it?  FreeBSD does the same thing, only
> every three days.  I dont' know whether it's not enabled on a fresh
> install, but it's there, you only need to flip the switch.  I doubt /tmp
> cleaning is such an unusual thing, especially on large sites.

Yes, there are lots of systems that will clean /tmp --- and since the
lock file is an ordinary file (not a socket) pretty much any tmp-cleaner
is going to decide to remove it.  I think that I had intended to insert
a periodic touch of the lockfile and forgot to.

Touching it every time through ServerLoop is an overreaction though.
I'd suggest touching it in the checkpoint-process-firing code, which
runs every five minutes (or so?) by default.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stefan Klopp
Date:
Subject: Database tables disappeared.
Next
From: Jan Wieck
Date:
Subject: Re: Bug in FOREIGN KEY