From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Split regression tests for TOAST compression methods into two fi
Date: Thu, 17 Jul 2025 05:11:18 +0000
Message-ID: <E1ucGtq-006hev-2k@gemulon.postgresql.org> (raw)
Split regression tests for TOAST compression methods into two files
The regression tests for TOAST compression methods are split into two
independent files: one specific to LZ4 and interactions between two
different TOAST compression methods, now called compression_lz4, and a
second one for the "core" cases where only pglz is required.
This saves 300 lines in diffs coming from the alternate output of
compression.sql, required for builds where lz4 is not available. The
new test is skipped if the build does not support LZ4 compression,
relying on an \if and the values reported in pg_settings for the GUC
default_toast_compression, "lz4" being available only under USE_LZ4.
Another benefit of this split is that this facilitates the addition of
more compression methods for TOAST, which are under discussion.
Note the trick added for the tests of the GUC default_toast_compression,
where VERBOSITY = terse is used to avoid the HINT printing the lists of
values available in the GUC, which are environment-dependent. This
makes compression.sql independent of the availability of LZ4.
The code coverage of toast_compression.c is slightly improved, increased
from 89% to 91%, with one new case covered in lz4_compress_datum() for
incompressible data.
Author: Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>
Co-authored-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aDlcU-ym9KfMj9sG@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/74a3fc36f3141677a94d1f6fbfaee4cb3896a35a
Modified Files
--------------
src/test/regress/expected/compression.out | 235 ++--------------
src/test/regress/expected/compression_1.out | 360 ------------------------
src/test/regress/expected/compression_lz4.out | 249 ++++++++++++++++
src/test/regress/expected/compression_lz4_1.out | 7 +
src/test/regress/parallel_schedule | 2 +-
src/test/regress/sql/compression.sql | 84 +-----
src/test/regress/sql/compression_lz4.sql | 129 +++++++++
7 files changed, 414 insertions(+), 652 deletions(-)
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: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Split regression tests for TOAST compression methods into two fi
In-Reply-To: <E1ucGtq-006hev-2k@gemulon.postgresql.org>
* 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