diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-03-10 09:35:42 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-03-10 09:35:42 +0900 |
commit | 0ba71107efeeccde9158f47118f95043afdca0bb (patch) | |
tree | 88e76f41af9d3fe66ecee5b4d4bb552d1210bd67 /src/bin/psql/command.c | |
parent | 6540cc517dd452874a4e0fb268aee9b92e5136c6 (diff) | |
download | postgresql-0ba71107efeeccde9158f47118f95043afdca0bb.tar.gz postgresql-0ba71107efeeccde9158f47118f95043afdca0bb.zip |
Revert changes for SSL compression in libpq
This partially reverts 096bbf7 and 9d2d457, undoing the libpq changes as
it could cause breakages in distributions that share one single libpq
version across multiple major versions of Postgres for extensions and
applications linking to that.
Note that the backend is unchanged here, and it still disables SSL
compression while simplifying the underlying catalogs that tracked if
compression was enabled or not for a SSL connection.
Per discussion with Tom Lane and Daniel Gustafsson.
Discussion: https://postgr.es/m/YEbq15JKJwIX+S6m@paquier.xyz
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 8d6970a4f34..c98e3d31d0c 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3509,6 +3509,7 @@ printSSLInfo(void) const char *protocol; const char *cipher; const char *bits; + const char *compression; if (!PQsslInUse(pset.db)) return; /* no SSL */ @@ -3516,11 +3517,13 @@ printSSLInfo(void) protocol = PQsslAttribute(pset.db, "protocol"); cipher = PQsslAttribute(pset.db, "cipher"); bits = PQsslAttribute(pset.db, "key_bits"); + compression = PQsslAttribute(pset.db, "compression"); - printf(_("SSL connection (protocol: %s, cipher: %s, bits: %s)\n"), + printf(_("SSL connection (protocol: %s, cipher: %s, bits: %s, compression: %s)\n"), protocol ? protocol : _("unknown"), cipher ? cipher : _("unknown"), - bits ? bits : _("unknown")); + bits ? bits : _("unknown"), + (compression && strcmp(compression, "off") != 0) ? _("on") : _("off")); } /* |