Re: location of Unix socket - Mailing list pgsql-hackers

From Tom Lane
Subject Re: location of Unix socket
Date
Msg-id 14899.974513046@sss.pgh.pa.us
Whole thread Raw
In response to Re: location of Unix socket  (Nathan Myers <ncm@zembu.com>)
List pgsql-hackers
Nathan Myers <ncm@zembu.com> writes:
>> * Oliver Elphick <olly@lfix.co.uk> [001117 16:41] wrote:
>>>> could the socket location be made a configurable parameter
>>>> in 7.1?

> /tmp is a bad place for this stuff anyway.

There have been *very long* discussions of this issue in the past,
see for example the threads "flock patch breaks things here" and
"postmaster locking issues" in pghackers around 8/31/98 and 10/10/98.
Could we have some review of the archives before people go off on
a new thread?

The bottom line is that the location of the socket file is a fundamental
part of the client/server protocol.  You can't just move it around on
a whim, or your clients will be unable to find your server.

We have just accepted a patch that allows explicit runtime specification
of the socket-file path.  (I've got severe doubts about it, because of
this issue --- but at least it doesn't affect people who don't use it.)

But if the socket-file path becomes a site-configuration item then we
will see a lot of complaints.  Look at the frequency with which we see
people asking about "Undefined variable client_encoding" notices ---
that proves that those folk are using clients and servers that weren't
configured identically.  That notice is at least pretty harmless ...
but if the configuration determines whether or not you can even contact
the server, it's not harmless.

I agree that /tmp was a stupid place to put the files, but we've got to
tread very lightly about moving them, or we'll create worse problems
than we solve.

BTW: a prediction, Oliver: you *will* live to regret making a
distribution-specific change in the socket file location.  Dunno
how long it will take, but I foresee bug reports from this.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: location of Unix socket
Next
From: Tom Lane
Date:
Subject: Re: Failure to recognise new database