Re: Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Devrim Gündüz <devrim(at)gunduz(dot)org>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9
Date: 2017-05-15 20:40:00
Message-ID: CAD3a31XM095kd20Ojgy3cT9mAwqGNsFBAA781=RMZyvoXCsCaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)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(at)centos-new postgresql]# ldd /usr/bin/psql | grep libpq
libpq.so.5 => /usr/pgsql-9.6/lib/libpq.so.5 (0x00007f2e6c99a000)
[root(at)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
*http://agency-software.org/ <http://agency-software.org/>*
*https://agency-software.org/demo/client
<https://agency-software.org/demo/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim Gündüz 2017-05-15 20:45:53 Re: Help: Installing 9.6 breaks local connections to 9.2 on Centos 6.9
Previous Message Ronny Abraham 2017-05-15 20:39:19 Re: Insert performance and disk usage in JSON vs JSONB