From stesch at no-spoon.de Mon Apr 24 18:52:46 2006 From: stesch at no-spoon.de (Stefan Scholl) Date: Mon, 24 Apr 2006 20:52:46 +0200 Subject: [pg-cvs] Re: [pg-devel] Socket path In-Reply-To: <20050206182200.GD7904@parsec.no-spoon.de> References: <20050206182200.GD7904@parsec.no-spoon.de> Message-ID: <20060424185246.GV1818@parsec.no-spoon.de> 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? From travis at crosswirecorp.com Tue Apr 25 23:45:22 2006 From: travis at crosswirecorp.com (Travis Cross) Date: Tue, 25 Apr 2006 19:45:22 -0400 Subject: [pg-cvs] Re: [pg-devel] Socket path In-Reply-To: <20060424185246.GV1818@parsec.no-spoon.de> References: <20050206182200.GD7904@parsec.no-spoon.de> <20060424185246.GV1818@parsec.no-spoon.de> Message-ID: <444EB492.7000102@crosswirecorp.com> 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