[pg-cvs] Re: [pg-devel] Socket path

Travis Cross travis at crosswirecorp.com
Tue Apr 25 23:45:22 UTC 2006


Stefan Scholl wrote:
> On 2005-02-06 19:22:00, Stefan Scholl wrote:
>> I was just wondering about the path of the unix domain socket. In
>> sysdep.lisp /var/run/postgresql is used. But the default path for
>> PostgreSQL's socket directory is /tmp.
> 
> Am I really the only one who has installed PostgresQL "by hand"
> and with its default paths?
> 
> No interest in my patch?

I have probably never hit this because I'm always using TCP sockets.

Also, this issue no longer seems to exist with the SBCL version of 
SOCKET-CONNECT in sysdep.lisp, wherein you need to supply the path 
name to the socket for the `host' parameter.  Of course, the fact 
that the nature of this behavior is not consistent between the 
implementations raises issues in itself.

See sysdep.lisp line 159:
(sb-bsd-sockets:socket-connect
   s (format nil  "~A.s.PGSQL.~D" (string host) port))

versus line 94:
(ext:connect-to-unix-socket
   (format nil "/var/run/postgresql/.s.PGSQL.~D" port)

This is the change that affected the SBCL side:

Mon Dec 19 17:21:50 EST 2005  emarsden
   * Fix the SB-ROTATE-BYTE dependency for SBCL (was loaded twice, 
with unfortunate consequences).

   Add support for unix-socket connections to the backend for SBCL.

   (Thanks to Andreas Fuchs)


The idea of passing in the path to the socket using the host 
parameter actually seems like a reasonable solution to me, if the 
behavior were consistent between implementations.

Cheers,

-- Travis



More information about the pg-devel mailing list