Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 onCentos 6.9 - Mailing list pgsql-general

From Ken Tanzer
Subject Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 onCentos 6.9
Date
Msg-id CAD3a31XM095kd20Ojgy3cT9mAwqGNsFBAA781=RMZyvoXCsCaA@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 onCentos 6.9  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2 onCentos 6.9  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general

Workarounds:

* You can connect to 9.2 using /usr/pgsql-9.2/bin/psql command. It knows the
old socket directory.

That was where I was going until I saw this in the OP:

bash-4.1$ /usr/pgsql-9.2/bin/psql -p 5432
psql: could not connect to server: Connection refused
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?



* Pass -h /tmp to 9.6's psql, so that it connects to 9.2 instance.

-HTH

Regards,



--
Adrian Klaver
adrian.klaver@aklaver.com


Thanks everyone for the replies.  Adrian is right--I did try this with the 9.2 binaries, with the same problem.  But to address Tom's question (and if I'm using ldd properly), the 9.2 psql binary is using the 9.6 libpq.

[root@centos-new postgresql]# ldd /usr/bin/psql | grep libpq
libpq.so.5 => /usr/pgsql-9.6/lib/libpq.so.5 (0x00007f2e6c99a000)
[root@centos-new postgresql]# ldd /usr/pgsql-9.2/bin/psql | grep libpq
libpq.so.5 => /usr/pgsql-9.6/lib/libpq.so.5 (0x00007f52f9c67000)

Devrim--the -h /tmp option works great.

I still wanted this to just "work" though, for scripts and such.  I specified the socket directory in the 9.2 postgresql.conf, and it seems to be working "normally" now.

But let me ask, is there a big warning about this somewhere I missed?  Can the 9.2 updates do something to fix this, or at least create a warning or an RPMNEW file?  I'm happy this is a cloud server and that I worked on a copy.  However, in different circumstances I might well have reasoned "well, installing the 9.6 packages really should be safe for 9.2, since they're clearly meant to exist side-by-side."  And then have a setup that no longer worked as it once did.  With an RHEL clone and PGDG packages straight from the horses mouth, I'd have higher expectations than that.  Only because of the great work y'all do! ;)

Cheers,
Ken



--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: Ronny Abraham
Date:
Subject: Re: [GENERAL] Insert performance and disk usage in JSON vs JSONB
Next
From: Devrim Gündüz
Date:
Subject: Re: [GENERAL] Help: Installing 9.6 breaks local connections to 9.2on Centos 6.9