Re: WAL compression setting after PostgreSQL LZ4 default change - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: WAL compression setting after PostgreSQL LZ4 default change
Date
Msg-id CAMT0RQTJAEhXZQtLKZPs=ZSv5LVGHgO_X23boNmj89-CYxDs=A@mail.gmail.com
Whole thread
In response to Re: WAL compression setting after PostgreSQL LZ4 default change  (Christoph Berg <myon@debian.org>)
List pgsql-hackers
For the CPU usage vs compression ratio discussion, please remember
that for both lz4 and zstd this depends on certain "compression
effort" flags, which we do not expose to customers (we claim we
already choose the best ones for them :) )

To have a good basis for any recommendation someone could run a bunch
of tests with different compression level flags and compare the
results for CPU usage and compression ration for 8kB pages.

On Mon, Aug 3, 2026 at 10:26 AM Andreas Karlsson <andreas@proxel.se> wrote:
>
> On 7/31/26 23:44, Tomas Vondra wrote:
> > As for the zstd vs. lz4 - the patch put zstd first mostly because
> > Michael prefers it over lz4. I don't think either of these is superior.
> > AFAIK the algorithms make different trade offs - zstd tends to compress
> > better, but uses (substantially) more CPU. I think it makes sense to
> > default to lz4, it's clearly better than pglz, with low CPU usage.
>
> +1 I think lz4 is the more sensible default due to the low CPU usage.
>
> --
> Andreas Karlsson
> Percona
>
>
>



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: [WiP] GiST intrapage indexing
Next
From: Matthias van de Meent
Date:
Subject: Re: [SP-]GiST IOS visibility bug (was: Why doens't GiST require super-exclusive lock)