pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vincent Predoehl <vpredoehl@phoenixwebgroup.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: connecting with libpq interface
Date: Fri, 11 Jul 2008 17:34:45 -0400
Message-ID: <28361.1215812085@sss.pgh.pa.us> (raw)
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>

Vincent Predoehl <vpredoehl@phoenixwebgroup.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



view thread (7+ messages)  latest in thread

Message-ID: <28361.1215812085@sss.pgh.pa.us>
Permalink:  ../28361.1215812085@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28361.1215812085@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vpredoehl@phoenixwebgroup.com
  Subject: Re: connecting with libpq interface
  In-Reply-To: <28361.1215812085@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox