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

Re: F_SETLK is looking worse and worse...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: F_SETLK is looking worse and worse...
Date: 2000-11-29 16:53:13
Message-ID: 27690.975516793@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Red Hat by default cleans out all files under /tmp and subdirectories that
> haven't been accesses for 10 days.  I assume other Linux distributions do
> similar things.  Red Hat's tmpwatch doesn't ever follow symlinks, though.  

Nor remove them?

> That means you could make /tmp/.s.PGSQL.5432.lock a symlink to
> PGDATA/postmaster.pid.  That might be a good idea in general, since
> establishes an easy to examine correspondence between data directory and
> port number.

I think this is a bad idea, because it assumes that the would-be
examiner (a) has read access to someone else's data directory, and
(b) has the same chroot setting as the someone else does (else the
symlink won't mean the same thing to both of them).  UUNET was planning
to run postmasters chrooted into various subdirectories, IIRC, so
point (b) isn't hypothetical.

However, I have no objection to writing the value of DataDir into
the socket lockfile (along with the owner's PID) if that seems like
a worthwhile bit of info.

Would there be any value in having a postmaster re-read its own socket
lockfile every so often, to keep it looking active to /tmp sweepers?
Or is that too much of a kluge?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: mlwDate: 2000-11-29 22:07:19
Subject: Re: [Fwd: Re: 8192 BLCKSZ ?]
Previous:From: Peter EisentrautDate: 2000-11-29 16:37:31
Subject: Re: F_SETLK is looking worse and worse...

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