Re: adding 'zstd' as a compression algorithm

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: adding 'zstd' as a compression algorithm
Date: 2022-02-17 04:34:08
Message-ID: Yg3QQAyA1+mR5SHv@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 16, 2022 at 10:40:01AM -0500, Robert Haas wrote:
> On Tue, Feb 15, 2022 at 9:33 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> Yes, the patch misses the fact that each ./configure switch is
>> documented. For consistency, I think that you should also add that in
>> the MSVC scripts in the first version. It is really straight-forward
>> to do so, and it should be just a matter of grepping for the code
>> paths of lz4, then adjust things for zstd.
>
> Makes sense. Here's an attempt by me to do that.

Thanks. This looks pretty much right, except for two things that I
have taken the freedom to fix as of the v3 attached.

%define needs to include HAVE_LIBZSTD, HAVE_ZSTD_H and USE_ZSTD, so
this version fails the sanity check between pg_config.h.in and the
MSVC scripts checking that all flags exist.

@@ -351,6 +351,7 @@ XGETTEXT = @XGETTEXT@
GZIP = gzip
BZIP2 = bzip2
LZ4 = @LZ4@
+ZSTD = @ZSTD@
A similar refresh is needed in vcregress.pl.

+ $proj->AddLibrary($self->{options}->{zstd} . '\lib\libzstd.lib');
The upstream code is also using this library name, so that should be
fine.
--
Michael

Attachment Content-Type Size
v3-0001-Add-support-for-building-with-ZSTD.patch text/x-diff 18.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-02-17 04:49:13 Re: Per-table storage parameters for TableAM/IndexAM extensions
Previous Message Andres Freund 2022-02-17 04:32:52 Re: Race conditions in 019_replslot_limit.pl