Re: [ADMIN] psql can't connect to old DB after installing new binaries - Mailing list pgsql-admin

From Tom Lane
Subject Re: [ADMIN] psql can't connect to old DB after installing new binaries
Date
Msg-id 21116.1507147420@sss.pgh.pa.us
Whole thread Raw
In response to [ADMIN] psql can't connect to old DB after installing new binaries  (Don Seiler <don@seiler.us>)
Responses Re: [ADMIN] psql can't connect to old DB after installing new binaries  (Don Seiler <don@seiler.us>)
List pgsql-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

pgsql-admin by date:

Previous
From: Don Seiler
Date:
Subject: [ADMIN] psql can't connect to old DB after installing new binaries
Next
From: Jerry Sievers
Date:
Subject: Re: [ADMIN] psql can't connect to old DB after installing new binaries