Re: ZSTD TOAST compression, and an extensible compression method encoding

From: Greg Burd <greg(at)burd(dot)me>
To: Hannu Krosing <hannuk(at)google(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Manu <manuelreyesbravo(at)gmail(dot)com>, Nikhil Kumar Veldanda <veldanda(dot)nikhilkumar17(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Japin Li <japinli(at)hotmail(dot)com>, Dharin Shah <dharinshah95(at)gmail(dot)com>
Subject: Re: ZSTD TOAST compression, and an extensible compression method encoding
Date: 2026-10-26 19:02:50
Message-ID: aCl7tfoAT7yIe6plWJYZEL23fxojh3WawFRb8qyjTzueu53BohF2Y0-D86vwUutjQDMTSCqYkcPS9qLAaNeqw4Anp1ZFPEkoiBV_aReThfs=@burd.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Sunday, October 25th, 2026 at 12:52 PM, Hannu Krosing <hannuk(at)google(dot)com> wrote:

> Hi Greg
>
> Please take a look at a generalized design for the compression dictionary
>
> In email: [PATCH v1] Generic Datum Encoding and Compression Contexts
> (pg_encoding_type, pg_encoding_context)

Hey Hannu,

Sure thing, I'll give that a look and see how the two designs might become
one.

> I have used this myself in dictionary compression for zstd and lz4 and
> for keeping Apache Avro schemas for JSON and JSONB encodings and
> defining cascaded Avro+zstd

Interesting use cases.

> And also I used the same for storing quantization tables for pgvector
> int8 and other quantizations

Hmmm... ok.

> This could also be used for other "encoding" tasks, like having a
> public key for writes and a more restricted private key for reads,
> etc.

Are we at risk of over-generalizing/loading this one idea too much? I'd
imagine you to say "no", but I had to ask. :)

> The main point is that having a generic facility for these kinds of
> tasks would benefit many use cases.

I'm all for reuse and a generic facility if one can be agreed upon.

> Cheers,
> Hannu

best.

-greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-10-26 19:04:09 Re: doc: pg_restore --filter refers to nonexistent --indexes option
Previous Message Manu 2026-10-26 19:02:25 Re: Do we need an index on pg_constraint.confrelid?