Re: fcntl(SETLK) [was Re: 2nd update on TOAST] - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Date
Msg-id 200007081503.LAA11872@candle.pha.pa.us
Whole thread Raw
In response to Re: fcntl(SETLK) [was Re: 2nd update on TOAST]  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> The other problem is a socket file left behind by a crashed postmaster. I
> don't consider this such a big problem; a crashed postmaster is not the
> normal mode of operation. The friendly message we have right now seems
> alright to me. And it's a way of tell that the postmaster crashed at all.
> 
> One idea to get the pid in there somewhere is creating a socket file
> "/tmp/.s.PGSQL.port.pid" and making /tmp/.s.PGSQL.port a symlink to it.
> Then clients don't know the difference, but the server knows the pid and
> can take appropriate action. Or make the symlink the other way around, not
> sure.

The symlink is an interesting idea.  lstat() on the normal name can give
the file name with pid.

--  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,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: postgres TODO
Next
From: Chris Bitmead
Date:
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]