pgsql: Split regression tests for TOAST compression methods into two fi - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Split regression tests for TOAST compression methods into two fi
Date
Msg-id E1ucGtq-006hev-2k@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: pg_logicalinspect: Fix possible crash when passing a directory p
Next
From: Amit Langote
Date:
Subject: pgsql: Remove duplicate line