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

From Michael Paquier
Subject Re: WAL compression setting after PostgreSQL LZ4 default change
Date
Msg-id allUaU_1C1-sSwh8@paquier.xyz
Whole thread
In response to Re: WAL compression setting after PostgreSQL LZ4 default change  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
On Thu, Jul 16, 2026 at 05:00:58PM +0200, Tomas Vondra wrote:
> My opinion is "on" should be a generic "pick compression" option, giving
> the database the mandate to pick an algorithm. A user who wants a
> particular algorithm can specify that.
>
> The only reason why "on" means "pglz" is that initially that was the
> only supported algorithm (until PG 15). But if we supported multiple
> algorithms from the beginning, would we do it that way? I don't think
> so. We'd either not have "on" at all, or it'd pick the best algorithm.

I have worked on both things.  I cannot go back in time, but I suspect
that I would have picked up pglz as default for "on" out of safety as
a start point.

A few releases later, where I know that many deployments are using
either lz4 or zstd and nobody has complained back, I see a much better
argument in changing the behavior of "on" to mean "zstd" -> "lz4" ->
"pglz" in order of priority, based on how efficient these algorithms
are known to be.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Logan Saso
Date:
Subject: [PATCH] Ignore duplicate IS [NOT] NULL clauses in clauselist_selectivity()
Next
From: Peter Geoghegan
Date:
Subject: Re: Hash index AM fake LSN oversight