Re: psql can't connect to old DB after installing new binaries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Seiler <don(at)seiler(dot)us>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: psql can't connect to old DB after installing new binaries
Date: 2017-10-04 20:03:40
Message-ID: 21116.1507147420@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Don Seiler <don(at)seiler(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jerry Sievers 2017-10-04 20:09:59 Re: psql can't connect to old DB after installing new binaries
Previous Message Don Seiler 2017-10-04 19:26:15 psql can't connect to old DB after installing new binaries