pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Postgres Maillist <pgsql-admin@postgresql.org>
Subject: Re: unix socket location confusion
Date: Sun, 22 Mar 2015 18:28:24 -0400
Message-ID: <3184.1427063304@sss.pgh.pa.us> (raw)
In-Reply-To: <0A21BC93-7B9C-476E-AAF4-0FF71708E87F@elevated-dev.com>
References: <0A21BC93-7B9C-476E-AAF4-0FF71708E87F@elevated-dev.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Scott Ribe <scott_ribe@elevated-dev.com> writes:
> - on OS X 10.10.2
> - downloaded 9.3.6 sources
> - ./configure --with-openssl --prefix=/my/specific/location/pg-9.3
> - make & install
> - cd /my/specific/location/
> - pg-9.3/bin/postmaster -D...
> - socket is created in /tmp, as expected
> - pg-9.3/bin/psql mydb
> - gives error about not being able to connect to /var/pgsql_socket/.s.PGSQL.5432
> - ???

OS X ships with a libpq that's configured that way:

$ ls -l /usr/lib/libpq*
-rwxr-xr-x  1 root  wheel  155696 Sep  9  2014 /usr/lib/libpq.5.5.dylib
lrwxr-xr-x  1 root  wheel      15 Oct 18 13:00 /usr/lib/libpq.5.dylib -> libpq.5.5.dylib
lrwxr-xr-x  1 root  wheel      15 Oct 18 13:00 /usr/lib/libpq.dylib -> libpq.5.5.dylib
$ strings /usr/lib/libpq.5.5.dylib | grep var
/var/pgsql_socket
$ strings /usr/lib/libpq.5.5.dylib | grep tmp
$ 

Evidently your psql is linking to this libpq and not the one you built.
You can fix that with suitable use of rpath; although I'm not sure why
an out-of-the-box build doesn't do that for you.  It works fine for
me:

$ otool -L ~/testversion/bin/psql
/Users/tgl/testversion/bin/psql:
        /Users/tgl/testversion/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.8.0)
        /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

and I don't believe I'm using any nondefault switches to get that.

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (6+ messages)  latest in thread

Message-ID: <3184.1427063304@sss.pgh.pa.us>
Permalink:  ../3184.1427063304@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3184.1427063304@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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, scott_ribe@elevated-dev.com
  Subject: Re: unix socket location confusion
  In-Reply-To: <3184.1427063304@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