pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Seiler <don@seiler.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: psql can't connect to old DB after installing new binaries
Date: Wed, 04 Oct 2017 16:03:40 -0400
Message-ID: <21116.1507147420@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHJZqBDBMzeeXRg8+PfkDN1avQM=DDZp90gDw9pUGK=pVUmYmA@mail.gmail.com>
References: <CAHJZqBDBMzeeXRg8+PfkDN1avQM=DDZp90gDw9pUGK=pVUmYmA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Don Seiler <don@seiler.us> writes:
> However, after installing the 9.6 binaries, psql complains about the socket
> file:
> psql: 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"?
> My postgres 9.2 database has a socket file in /tmp/.s.PGSQL.5432.

Yeah, I think Devrim switched the default socket location from /tmp
to /var/run/postgresql to conform to what the Red Hat build does.

> What's interesting is that I get this error even when running the 9.2
> psql as well:

I believe that the client-side default for this is embedded in libpq.so.
Probably the way things are set up, the 9.2 psql uses the 9.6 libpq.so
if it's installed.  That would tend to happen if the libpq.so is being
picked up from /usr/lib(64) rather than a version-specific directory
("ldd" would help you check that).

Since at least 9.3, it's been possible to configure the server to create
more than one socket file (see unix_socket_directories).  Recommended
practice when you're dealing with multiple client builds is to create
sockets in both places.

			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 (7+ messages)  latest in thread

Message-ID: <21116.1507147420@sss.pgh.pa.us>
Permalink:  ../21116.1507147420@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21116.1507147420@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, don@seiler.us
  Subject: Re: psql can't connect to old DB after installing new binaries
  In-Reply-To: <21116.1507147420@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