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

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Re: [ADMIN] psql can't connect to old DB after installing new binaries
Дата
Msg-id CAHJZqBASFrrTXkiF=6RrS5SUaD4zYKGGAOF_3NRnLFrp-rMpAw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ADMIN] psql can't connect to old DB after installing new binaries  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [ADMIN] psql can't connect to old DB after installing newbinaries  (Devrim Gündüz <devrim@gunduz.org>)
Список pgsql-admin


On Wed, Oct 4, 2017 at 3:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

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).

Looks like that is what happened here:

/usr/pgsql-9.2/bin
postgres@dts-clone$ ldd psql | grep libpq
libpq.so.5 => /usr/pgsql-9.6/lib/libpq.so.5 (0x00007f9f0b2bf000)

It's pointing to the newly installed version instead of the version it the 9.2 lib directory. There isn't any such file under /usr/lib64. So how is it even aware of that /usr/pgsql-9.6 version?
 

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.

Yep that sounds good for later, although can't really help me in this case. I guess I can set unix_socket_directory in 9.2 to use the new location but that requires a restart anyway, not ideal.

Would creating a symlink be a workaround? Would that cause issues with server restarts?

Mind that this is only to prepare for the upgrade. We aren't planning to run both 9.2 and 9.6, and eventually 9.2 would be removed.
--
Don Seiler
www.seiler.us

В списке pgsql-admin по дате отправления:

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