From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Vincent Predoehl <vpredoehl(at)phoenixwebgroup(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: connecting with libpq interface |
Date: | 2008-07-11 21:34:45 |
Message-ID: | 28361.1215812085@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Vincent Predoehl <vpredoehl(at)phoenixwebgroup(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-07-11 21:48:47 | Re: connecting with libpq interface |
Previous Message | Vincent Predoehl | 2008-07-11 20:20:48 | Re: connecting with libpq interface |