Re: Zstandard support for toast compression

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Zstandard support for toast compression
Date: 2022-05-17 18:54:28
Message-ID: CA+TgmobZkCvpUJAh63XkCPRN3aYYbEEcMTY=cqmZdGRLZNbyCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 17, 2022 at 12:19 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> Toast compression is supported for LZ4, and thanks to the refactoring
> work done with compression methods assigned to an attribute, adding
> support for more methods is straight-forward, as long as we don't
> support more than 4 methods as the compression ID is stored within the
> first 2 bits of the raw length.

Yeah - I think we had better reserve the fourth bit pattern for
something extensible e.g. another byte or several to specify the
actual method, so that we don't have a hard limit of 4 methods. But
even with such a system, the first 3 methods will always and forever
be privileged over all others, so we'd better not make the mistake of
adding something silly as our third algorithm.

I don't particularly have anything against adding Zstandard
compression here, but I wonder whether there's any rush. If we decide
not to add this now, we can always change our minds and add it later,
but if we decide to add it now, there's no backing it out. I'd
probably be inclined to wait and see if our public demands it of us.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2022-05-17 19:29:47 Re: Zstandard support for toast compression
Previous Message Tom Lane 2022-05-17 18:43:51 Re: Expand palloc/pg_malloc API