Re: location of Unix socket

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: location of Unix socket
Date: 2000-11-18 02:04:06
Message-ID: 14899.974513046@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Myers <ncm(at)zembu(dot)com> writes:
>> * Oliver Elphick <olly(at)lfix(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-11-18 03:45:38 Re: Failure to recognise new database
Previous Message Bruce Momjian 2000-11-18 01:28:30 Re: location of Unix socket