]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add tests for low-level PGLZ [de]compression routines
authorMichael Paquier <michael@paquier.xyz>
Tue, 14 Apr 2026 20:09:12 +0000 (05:09 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 14 Apr 2026 20:09:12 +0000 (05:09 +0900)
commitcaee654e05e886bf0198cdd8a1c021ca321999b8
tree72954cafe47d62e93b50e00598f8b60c3d96a5bb
parentc7cdcbd3e6a72f858690ed7e69046cf2cd41fb19
Add tests for low-level PGLZ [de]compression routines

The goal of this module is to provide an entry point for the coverage of
the low-level compression and decompression PGLZ routines.  The new test
is moved to a new parallel group, with all the existing
compression-related tests added to it.

This includes tests for the cases detected by fuzzing that emulate
corrupted compressed data, as fixed by 2b5ba2a0a141:
- Set control bit with read of a match tag, where no data follows.
- Set control bit with read of a match tag, where 1 byte follows.
- Set control bit with match tag where length nibble is 3 bytes
(extended case).

While on it, some tests are added for compress/decompress roundtrips,
and for check_complete=false/true.  Like 2b5ba2a0a141, backpatch to all
the stable branches.

Discussion: https://postgr.es/m/adw647wuGjh1oU6p@paquier.xyz
Backpatch-through: 14
src/test/regress/expected/compression_pglz.out [new file with mode: 0644]
src/test/regress/parallel_schedule
src/test/regress/regress.c
src/test/regress/sql/compression_pglz.sql [new file with mode: 0644]