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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Oct 4, 2017 at 3:03 PM, Tom Lane <tgl@xxxxxxxxxxxxx> 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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux