mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
38f60f174e
This reverts commit 9e10898
, after finding out that buildfarm members
running SLES 15 on z390 complain on the compression and decompression
logic of the new test: pipistrelles, barbthroat and steamerduck.
Those hosts are visibly using hardware-specific changes to improve zlib
performance, requiring more investigation.
Thanks to Tom Lane for the discussion.
Discussion: https://postgr.es/m/20200722093749.GA2564@paquier.xyz
Backpatch-through: 9.5
51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
--
|
|
-- PGP compression support
|
|
--
|
|
select pgp_sym_decrypt(dearmor('
|
|
-----BEGIN PGP MESSAGE-----
|
|
|
|
ww0ECQMCsci6AdHnELlh0kQB4jFcVwHMJg0Bulop7m3Mi36s15TAhBo0AnzIrRFrdLVCkKohsS6+
|
|
DMcmR53SXfLoDJOv/M8uKj3QSq7oWNIp95pxfA==
|
|
=tbSn
|
|
-----END PGP MESSAGE-----
|
|
'), 'key', 'expect-compress-algo=1');
|
|
pgp_sym_decrypt
|
|
-----------------
|
|
Secret message
|
|
(1 row)
|
|
|
|
select pgp_sym_decrypt(
|
|
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=0'),
|
|
'key', 'expect-compress-algo=0');
|
|
pgp_sym_decrypt
|
|
-----------------
|
|
Secret message
|
|
(1 row)
|
|
|
|
select pgp_sym_decrypt(
|
|
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=1'),
|
|
'key', 'expect-compress-algo=1');
|
|
pgp_sym_decrypt
|
|
-----------------
|
|
Secret message
|
|
(1 row)
|
|
|
|
select pgp_sym_decrypt(
|
|
pgp_sym_encrypt('Secret message', 'key', 'compress-algo=2'),
|
|
'key', 'expect-compress-algo=2');
|
|
pgp_sym_decrypt
|
|
-----------------
|
|
Secret message
|
|
(1 row)
|
|
|
|
-- level=0 should turn compression off
|
|
select pgp_sym_decrypt(
|
|
pgp_sym_encrypt('Secret message', 'key',
|
|
'compress-algo=2, compress-level=0'),
|
|
'key', 'expect-compress-algo=0');
|
|
pgp_sym_decrypt
|
|
-----------------
|
|
Secret message
|
|
(1 row)
|
|
|