psql should re-read connection variables after connection reset - Mailing list pgsql-bugs

From Peter Billen
Subject psql should re-read connection variables after connection reset
Date
Msg-id CAMTXbE8e6U=EBQfNSe01Ej17CBStGiudMAGSOPaw-ALxM-5jXg@mail.gmail.com
Whole thread Raw
Responses Re: psql should re-read connection variables after connection reset  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,

After a connection reset, psql should re-read the connection variables. This was was initially reported by ysch on IRC and confirmed in the code by Zr40. All I'm doing here is making sure that it is reported, as per ysch's request.

I quickly verified this as following:

   1. start 11 instance
   2. psql into it
   3. stop 11 instance
   4. start 10 instance
   5. in the existing psql session, first trigger a reconnect ('select 1') and then '\df', which depends on the server version. I got:

ERROR:  column p.prokind does not exist
LINE 5:  CASE p.prokind

This happens because the psql session believes it is still connected to the 11 instance, as confirmed by Zr40:


Best regards.

pgsql-bugs by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails onWindows with Visual Studio 2017
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails onWindows with Visual Studio 2017