From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Cc: Daniel Gustafsson <daniel@yesql.se>
Subject: Re: pgsql: Remove support for SSL compression
Date: Tue, 9 Mar 2021 12:26:15 +0900
Message-ID: <YEbq15JKJwIX+S6m@paquier.xyz> (raw)
In-Reply-To: <E1lJRxU-00051U-47@gemulon.postgresql.org>
References: <E1lJRxU-00051U-47@gemulon.postgresql.org>
On Tue, Mar 09, 2021 at 02:18:52AM +0000, Michael Paquier wrote:
> Remove support for SSL compression
>
> PostgreSQL disabled compression as of e3bdb2d and the documentation
> recommends against using it since. Additionally, SSL compression has
> been disabled in OpenSSL since version 1.1.0, and was disabled in many
> distributions long before that. The most recent TLS version, TLSv1.3,
> disallows compression at the protocol level.
(Adding Daniel in CC)
So, this is breaking a test case in crake where an upgrade from 9.3 is
done with a FDW server using this option that gets restored:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2021-03-09%2002%3A32%3A29
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 1541; 1417 55431 SERVER testserver1
buildfarm
pg_restore: error: could not execute query: ERROR: invalid option
"sslcompression"
It looks like it is not that much a good idea to define it as a debug
option after all. So I guess that the attached would fix the failure,
where FDW servers can still pass down the parameter at will for
backward-compatibility, and where libpq keeps ignoring its value. Any
thoughts?
--
Michael
Attachments:sslcompression-fix.patch (text/x-diff, 2.7K) downloaddiff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.cindex fed06bb038..a294d293eb 100644--- a/src/interfaces/libpq/fe-connect.c+++ b/src/interfaces/libpq/fe-connect.c@@ -298,7 +298,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
* compatibility.
*/
{"sslcompression", NULL, NULL, NULL,
- "SSL-Compression", "D", 1, -1},+ "SSL-Compression", "", 1, -1},
{"sslcert", "PGSSLCERT", NULL, NULL,
"SSL-Client-Cert", "", 64,
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.outindex c2565dfc70..f17f3b6c29 100644--- a/contrib/postgres_fdw/expected/postgres_fdw.out+++ b/contrib/postgres_fdw/expected/postgres_fdw.out@@ -167,6 +167,7 @@ ALTER SERVER testserver1 OPTIONS (
sslcert 'value',
sslkey 'value',
sslrootcert 'value',
+ sslcompression 'value',
sslcrl 'value',
--requirepeer 'value',
krbsrvname 'value',
@@ -8945,7 +8946,7 @@ DO $d$
END;
$d$;
ERROR: invalid option "password"
-HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, application_name, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_user_timeout, sslmode, sslcert, sslkey, sslrootcert, sslcrl, sslcrldir, requirepeer, ssl_min_protocol_version, ssl_max_protocol_version, gssencmode, krbsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fetch_size, batch_size+HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, application_name, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl, sslcrldir, requirepeer, ssl_min_protocol_version, ssl_max_protocol_version, gssencmode, krbsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fetch_size, batch_size
CONTEXT: SQL statement "ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')"
PL/pgSQL function inline_code_block line 3 at EXECUTE
-- If we add a password for our user mapping instead, we should get a different
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sqlindex a143a70406..be5618f759 100644--- a/contrib/postgres_fdw/sql/postgres_fdw.sql+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql@@ -181,6 +181,7 @@ ALTER SERVER testserver1 OPTIONS (
sslcert 'value',
sslkey 'value',
sslrootcert 'value',
+ sslcompression 'value',
sslcrl 'value',
--requirepeer 'value',
krbsrvname 'value',
signature.asc (application/pgp-signature, 832B) download
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-committers@postgresql.org
Cc: michael@paquier.xyz, daniel@yesql.se
Subject: Re: pgsql: Remove support for SSL compression
In-Reply-To: <YEbq15JKJwIX+S6m@paquier.xyz>
References: <E1lJRxU-00051U-47@gemulon.postgresql.org> <YEbq15JKJwIX+S6m@paquier.xyz>
* 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