Sure enough, the lock file is gone
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.
We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.
If we have to do it, let's make it an #ifdef __linux__ option.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Fri, Jan 26, 2001 at 03:18:13PM -0500, Bruce Momjian wrote:
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.If we have to do it, let's make it an #ifdef __linux__ option.
#ifdef BRAINDAMAGED_TMP_CLEANER ?
ISTR mention of non-linux platforms that do this.
Ross
* Peter Eisentraut <peter_e@gmx.net> [010126 12:11] wrote:
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.
Why not have the RPM/configure scripts stick it in where ever redhat
says it's safe to?
--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."
Ross J. Reedstrom wrote:
On Fri, Jan 26, 2001 at 03:18:13PM -0500, Bruce Momjian wrote:
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.If we have to do it, let's make it an #ifdef __linux__ option.
#ifdef BRAINDAMAGED_TMP_CLEANER ?
ISTR mention of non-linux platforms that do this.
Exactly the way you want it to do (open(2) and close(2) of a
UNIX domain socket) was what I had to do to get an old
Mach3-4.3BSD combo into a kernel-panic.
Better use utime(2) or the like for it.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
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.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Jan Wieck writes:
Exactly the way you want it to do (open(2) and close(2) of a
UNIX domain socket) was what I had to do to get an old
Mach3-4.3BSD combo into a kernel-panic.
The lock file is an ordinary file.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
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
Peter Eisentraut wrote:
Jan Wieck writes:
Exactly the way you want it to do (open(2) and close(2) of a
UNIX domain socket) was what I had to do to get an old
Mach3-4.3BSD combo into a kernel-panic.The lock file is an ordinary file.
So the crazy-temp-vacuum-cleaner on linux doesn't touch the
sockets?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
I said:
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.
Done now.
regards, tom lane
On Fri, Jan 26, 2001 at 03:18:13PM -0500, Bruce Momjian wrote:
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.If we have to do it, let's make it an #ifdef __linux__ option.
#ifdef BRAINDAMAGED_TMP_CLEANER ?
ISTR mention of non-linux platforms that do this.
Yes, thank you.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I said:
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.Done now.
Yes, checkpoint is a good place to put it. Thanks. I still liked the
BRAINDAMAGED_TMP_CLEANER though.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
On Fri, Jan 26, 2001 at 05:06:24PM -0500, Jan Wieck wrote:
So the crazy-temp-vacuum-cleaner on linux doesn't touch the
sockets?
The tmpwatch program that comes with many Linux distributions will only
unlink regular files and empty directories by default.
--
Bruce Guenter <bruceg@em.ca> http://em.ca/~bruceg/
On Fri, 26 Jan 2001, Peter Eisentraut wrote:
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.
Only on a poorly configured FreeBSD box. You do have to turn it on first.
FreeBSD (This is a 4.2-Stable box) will only delete files that have not been
modified within the set number of days. This amount is variable. You can also
tell clean_tmp to ignore any files you wish. This is all configurable via
rc.conf and friends.
GB
--
GB Clark II | Roaming FreeBSD Admin
gclarkii@GeekTech.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?
Jan Wieck wrote:
Peter Eisentraut wrote:
Jan Wieck writes:
Exactly the way you want it to do (open(2) and close(2) of a
UNIX domain socket) was what I had to do to get an old
Mach3-4.3BSD combo into a kernel-panic.The lock file is an ordinary file.
So the crazy-temp-vacuum-cleaner on linux doesn't touch the
sockets?
tmpreaper does - that's why I moved the socket in Debian.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Come now, and let us reason together, saith the LORD;
though your sins be as scarlet, they shall be as white
as snow; though they be red like crimson, they shall
be as wool." Isaiah 1:18
Import Notes
Reply to msg id not found: MessagefromJanWieckjanwieck@Yahoo.comofFri26Jan2001170624EST.200101262206.RAA04772@jupiter.greatbridge.com | Resolved by subject fallback
/tmp is for *temporary* files. Such a lock is not a temporary file, it
should go somewhere in /var, why not in /var/lib/pgsql/data ?
Show quoted text
The 'tmpwatch' program on Red Hat will remove the /tmp/.s.PGSQL.5432.lock
file after the server has run 6 days. This will be a problem.We could touch (open) the file once every time the ServerLoop() runs
around. It's not perfect but it should work in practice.
Florent Guillaume:
/tmp is for *temporary* files. Such a lock is not a temporary file,
it should go somewhere in /var, why not in /var/lib/pgsql/data ?
/var/run ?
--
Alessio F. Bragadini alessio@sevenseas.org
Jan Wieck wrote:
Peter Eisentraut wrote:
Jan Wieck writes:
Exactly the way you want it to do (open(2) and close(2) of a
UNIX domain socket) was what I had to do to get an old
Mach3-4.3BSD combo into a kernel-panic.The lock file is an ordinary file.
So the crazy-temp-vacuum-cleaner on linux doesn't touch the
sockets?tmpreaper does - that's why I moved the socket in Debian.
But you have complete control over the OS, while we don't. The problem
I see of moving it is that only Debian-compiled clients will work on
Debian systems.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Florent Guillaume wrote:
/tmp is for *temporary* files. Such a lock is not a temporary file, it
should go somewhere in /var, why not in /var/lib/pgsql/data ?
/var/lib is also not for locks, per FHS.
/var/lock/pgsql (or /var/lock/postgresql....) would be the FHS-mandated
place for such a file.
Comments? _Why_ is the lock in /tmp? Won't the lock always be put into
place by the uid used to run postmaster? Is a _world_ writeable
temporary directory the right place?
7.2 discussion, however, IMHO.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
first off, the lock file is put in by an unprivileged user, so /tmp works
on all systems ...
second, /tmp on a large portion of systems gets cleaned out after a
reboot, so there are no 'stray locks' to generally worry about...
On Sat, 27 Jan 2001, Lamar Owen wrote:
Florent Guillaume wrote:
/tmp is for *temporary* files. Such a lock is not a temporary file, it
should go somewhere in /var, why not in /var/lib/pgsql/data ?/var/lib is also not for locks, per FHS.
/var/lock/pgsql (or /var/lock/postgresql....) would be the FHS-mandated
place for such a file.Comments? _Why_ is the lock in /tmp? Won't the lock always be put into
place by the uid used to run postmaster? Is a _world_ writeable
temporary directory the right place?7.2 discussion, however, IMHO.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org