Re: ZStandard (with dictionaries) compression support for TOAST compression

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-07-17T05:28:08Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Split regression tests for TOAST compression methods into two files

  2. Refactor non-supported compression error message in toast_compression.c

On Tue, Jul 15, 2025 at 10:37:02PM -0700, Nikhil Kumar Veldanda wrote:
> 0001 – pg_compression_available()
> pg_compression_available() in misc.c feels sensible;

Actually, I have taken a step back on this one and recalled that the
list of values available for an enum GUC are already available in
pg_settings, so we can already do something without this function,
with the same result:
+SELECT NOT(enumvals @> '{lz4}') AS skip_test FROM pg_settings WHERE
+  name = 'default_toast_compression' \gset

> 0002 – test-suite split
> The new compression.sql / compression_lz4.sql split makes the diffs
> much easier to reason about.

Another thing that I have spent a lot of time on today while having a
second look was the code coverage after a make check.  There was one
surprising result: lz4_compress_datum() for the incompressible data
case now has some coverage.

A second thing is AdjustUpgrade.pm, which has the matview compressmv
with a qual based on cmdata1, but I think we're OK as this is an
adjustment of the upgrade dumps for 74a3fc36f314, which exists in
v16~.  I'll keep an eye on the buildfarm anyway, in case something
shows up.
--
Michael