public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: Maiquel Grassi <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: Pavel Luzanov <[email protected]>
Cc: Erik Wienhold <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Psql meta-command conninfo+
Date: Sat, 24 Feb 2024 14:44:12 -0600
Message-ID: <20240224204412.GA1866465@nathanxps13> (raw)
In-Reply-To: <CP8P284MB2496AAFB879ABC5B1CD01CF4EC532@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
References: <[email protected]>
	<CP8P284MB249652F5F0BE828C20A38348EC442@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
	<[email protected]>
	<CP8P284MB2496C7F14594722472C9FEBAEC482@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
	<[email protected]>
	<CP8P284MB24969B39579E808F9F44CCF8EC4D2@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
	<CP8P284MB249664C44A1793823C4546F8EC4D2@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>
	<[email protected]>
	<20240216155449.GA1236054@nathanxps13>
	<CP8P284MB2496AAFB879ABC5B1CD01CF4EC532@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM>

On Sat, Feb 17, 2024 at 02:53:43PM +0000, Maiquel Grassi wrote:
> The "pg_stat_ssl" view is available from >= PG 9.5, and the "pg_stat_gssapi" view is
> available from >= PG 12. The "compression" column was removed from the
> "pg_stat_ssl" from >= PG 14. All of these cases introduce greater complexity in
> maintaining the SQL. The central idea from the beginning has always been to show
> the user all the information from \conninfo and extend it in \conninfo+.

IMHO we should use the views whenever possible (for the reason stated
above [0]).  I think it's okay if we need to fall back to a different
approach for older versions.  But presumably we'll discontinue psql support
for these old server versions at some point, at which point we can simply
delete the dead code that doesn't use the views.

> The absence
> of the "compression" column in version 14 and above makes dealing with this even
> more complicated, and not showing it seems to contradict \conninfo.

I would be okay with using PQsslAttribute() for all versions for this one
since any remaining support for this feature is on its way out.  Once psql
no longer supports any versions that allow SSL compression, we could
probably remove it from \conninfo[+] completely or hard-code it to "off".

> SSL support has been available since version 7.1 (see documentation); if there was
> 
> support before that, I can't say. In this regard, it may seem strange, but there are still
> many legacy systems running older versions of PostgreSQL. Just yesterday, I assisted
> a client who is still using PG 8.2. In these cases, using the "pg_stat_ssl" and
> "pg_stat_gssapi" views would not be possible because they don't exist on the server.
> I believe that psql should cover as many cases as possible when it comes to compatibility
> with older versions (even those no longer supported). In this case, concerning SSL and
> GSS, I think libpq is better prepared to handle this.

At the moment, the psql support cutoff appears to be v9.2 (see commit
cf0cab8), which has been out of support for over 6 years.  If \conninfo+
happens to work for older versions, then great, but I don't think we should
expend too much energy in this area.

[0] https://postgr.es/m/20240216155449.GA1236054%40nathanxps13

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com






view thread (43+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Psql meta-command conninfo+
  In-Reply-To: <20240224204412.GA1866465@nathanxps13>

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

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