Re: ZStandard (with dictionaries) compression support for TOAST compression - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ZStandard (with dictionaries) compression support for TOAST compression
Date
Msg-id CA+Tgmob2xpQonZp7s+=v88kr-7epo0E4V6KmxNzAkFxEm8frSg@mail.gmail.com
Whole thread Raw
In response to Re: ZStandard (with dictionaries) compression support for TOAST compression  (Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>)
List pgsql-hackers
On Sun, May 4, 2025 at 8:54 AM Nikhil Kumar Veldanda
<veldanda.nikhilkumar17@gmail.com> wrote:
> I agree. Each compression algorithm can decide its own metadata size
> overhead. Callbacks can provide this information as well rather than
> storing in fixed length bytes(3 bytes). The revised patch introduces a
> "toast_cmpid_meta_size(const varatt_cmp_extended *hdr)", which
> calculates the metadata size.

I don't understand why we need this. I don't see why we need any sort
of generalized concept of metadata at all here. The zstd-dict
compression method needs to store a four-byte OID, so let it do that.
But we don't need to brand that as metadata; and we don't need a
method for other parts of the system to ask how much metadata exists.
At least, I don't think we do.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Daniel Westermann (DWE)"
Date:
Subject: Re: PG 18 release notes draft committed
Next
From: "David G. Johnston"
Date:
Subject: Re: fixing CREATEROLE