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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [ADMIN] psql can't connect to old DB after installing new binaries
Дата
Msg-id 21116.1507147420@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [ADMIN] psql can't connect to old DB after installing new binaries  (Don Seiler <don@seiler.us>)
Ответы Re: [ADMIN] psql can't connect to old DB after installing new binaries  (Don Seiler <don@seiler.us>)
Список 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 по дате отправления:

Предыдущее
От: Don Seiler
Дата:
Сообщение: [ADMIN] psql can't connect to old DB after installing new binaries
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: [ADMIN] psql can't connect to old DB after installing new binaries