Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4C52C65032C for ; Fri, 11 Jul 2008 18:38:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57389-02-7 for ; Fri, 11 Jul 2008 18:38:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A65FC650851 for ; Fri, 11 Jul 2008 18:34:47 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6BLYjY3028362; Fri, 11 Jul 2008 17:34:45 -0400 (EDT) To: Vincent Predoehl cc: pgsql-interfaces@postgresql.org Subject: Re: connecting with libpq interface In-reply-to: <33C26302-6E84-440C-843D-F39A2F892CEE@phoenixwebgroup.com> References: <8EAB9EDC-BC0E-4C5F-BE0F-20F6DBAE1660@phoenixwebgroup.com> <19689.1215806725@sss.pgh.pa.us> <33C26302-6E84-440C-843D-F39A2F892CEE@phoenixwebgroup.com> Comments: In-reply-to Vincent Predoehl message dated "Fri, 11 Jul 2008 15:20:48 -0500" Date: Fri, 11 Jul 2008 17:34:45 -0400 Message-ID: <28361.1215812085@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/10 X-Sequence-Number: 6768 Vincent Predoehl writes: > On Jul 11, 2008, at 3:05 PM, Tom Lane wrote: >>> could not connect to server: No such file or directory >>> Is the server running locally and accepting >>> connections on Unix domain socket "/var/run/ >>> postgresql/.s.PGSQL.5432"? >> >> What I'd wonder is whether the postmaster is using that socket >> location >> or not. The more common location is /tmp/.s.PGSQL.5432. You might >> have >> a problem with having a copy of libpq that has a different default >> socket path compiled into it than the postmaster does. > Do you know where can I find that in the source code? I used the > 8.3.3 source from postgresql.org. The postgresql.org sources will most certainly default to using /tmp. What I suspect now is that you have a postmaster that you built from source, and it's using /tmp (did you look for the socket file to verify?), but your client program is linking to an Ubuntu-supplied version of libpq.so that has a nonstandard socket location built in. You'll need to fool with ldconfig or local equivalent to get the dynamic linker to select the right copy of libpq.so. Or you could tell the postmaster to use /var/run/postgresql --- there's a configuration parameter for that somewhere, IIRC. regards, tom lane