pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Billen <peter.billen@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: psql should re-read connection variables after connection reset
Date: Sun, 02 Jun 2019 17:24:35 -0400
Message-ID: <22335.1559510675@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMTXbE8e6U=EBQfNSe01Ej17CBStGiudMAGSOPaw-ALxM-5jXg@mail.gmail.com>
References: <CAMTXbE8e6U=EBQfNSe01Ej17CBStGiudMAGSOPaw-ALxM-5jXg@mail.gmail.com>

Peter Billen <peter.billen@gmail.com> writes:
> 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:

Hm.  I'm not entirely convinced that that needs to be a supported
situation.  However, it is a bit odd that CheckConnection is willing to
do UnsyncVariables in one code path but not SyncVariables in the other.

I wonder whether we should also do connection_warnings(false) in this
code path.  That could be annoyingly chatty on SSL or GSS connections,
though.  It's too bad that printSSLInfo and printGSSInfo don't have
any notion like "print only if different from before".  More, I can
think of cases where they're not chatty enough: if before you had an
SSL-encrypted connection, and now you don't, that seems like something
you might wish to know about.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <22335.1559510675@sss.pgh.pa.us>
Permalink:  ../22335.1559510675@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22335.1559510675@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.billen@gmail.com
  Subject: Re: psql should re-read connection variables after connection reset
  In-Reply-To: <22335.1559510675@sss.pgh.pa.us>
  References: <CAMTXbE8e6U=EBQfNSe01Ej17CBStGiudMAGSOPaw-ALxM-5jXg@mail.gmail.com> <22335.1559510675@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox