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/
>> What I'd wonder is whether the postmaster is using that socket
>> or not. The more common location is /tmp/.s.PGSQL.5432. You might
>> 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
In response to
pgsql-interfaces by date
|Next:||From: Alvaro Herrera||Date: 2008-07-11 21:48:47|
|Subject: Re: connecting with libpq interface|
|Previous:||From: Vincent Predoehl||Date: 2008-07-11 20:20:48|
|Subject: Re: connecting with libpq interface |