[PATCH] Document wal_compression=on

Поиск
Список
Период
Сортировка
Искать

[PATCH] Document wal_compression=on

От:
Christoph Berg <myon@debian.org>
Дата:
Вложения:
The docs currently don't say what wal_compression=on is, so here is a
patch.

Christoph

Re: [PATCH] Document wal_compression=on

От:
John Naylor <johncnaylorls@gmail.com>
Дата:
On Mon, Jun 29, 2026 at 5:04 PM Christoph Berg  wrote:
>
> The docs currently don't say what wal_compression=on is, so here is a
> patch.

+1 for documenting this.

+        The value on is a deprecated alias for
pglz.

"deprecated" implies we may remove it someday. I don't think we'd gain
from doing that, but we could instead call 'on' a "historical
spelling" of 'pglz'.

-- 
John Naylor
Amazon Web Services


Re: [PATCH] Document wal_compression=on

От:
Christoph Berg <myon@debian.org>
Дата:
Re: John Naylor
> +        The value on is a deprecated alias for
> pglz.
> 
> "deprecated" implies we may remove it someday. I don't think we'd gain
> from doing that, but we could instead call 'on' a "historical
> spelling" of 'pglz'.

Or perhaps leave the door open for picking a better default in the future?

     The value on is currently an alias for pglz.

(I would be fine with either of the 3 variants.)

Maybe we should also update the postgresql.conf.sample:

 #wal_compression = off                  # enables compression of full-page writes;
-                                        # off, pglz, lz4, zstd, or on
+                                        # off, pglz (or on), lz4, or zstd

(Or just delete it there.)

Christoph


Re: [PATCH] Document wal_compression=on

От:
Michael Paquier <michael@paquier.xyz>
Дата:
Вложения:
On Mon, Jun 29, 2026 at 05:41:27PM +0700, John Naylor wrote:
> +        The value on is a deprecated alias for
> pglz.
> 
> "deprecated" implies we may remove it someday. I don't think we'd gain
> from doing that, but we could instead call 'on' a "historical
> spelling" of 'pglz'.

+1.
--
Michael

Re: [PATCH] Document wal_compression=on

От:
wenhui qiu <qiuwenhuifx@gmail.com>
Дата:

Hi 

The recent PostgreSQL commit changes the default TOAST compression to lz4 when LZ4 support is available, based on the rationale that LZ4 is generally more efficient than pglz in terms of CPU usage and compression ratio.Given that, should we also consider changing the default compression method used by wal_compression = on from pglz to lz4?

Currently, wal_compression = on still maps to pglz, while lz4 has to be selected explicitly with:

wal_compression = lz4

If LZ4 is now considered stable and preferable enough to become the default for TOAST compression, it may be worth aligning WAL compression behavior as well, or at least discussing whether on should continue to imply pglz.




Thanks  

Re: [PATCH] Document wal_compression=on

От:
John Naylor <johncnaylorls@gmail.com>
Дата:
On Tue, Jun 30, 2026 at 4:57 PM Christoph Berg  wrote:
>
> Re: John Naylor
> > FYI, default value of wal_compression is "off".
>
> Still, there is value in being consistent. If default_toast_compression=lz4
> and I turn wal_compression "on", I would also accept lz4 there.
>
> We are picking the best toast compression algorithm by default, we
> should also do that for wal.

The thread subject is about documenting the state of affairs that have
existed since PG15. If you want to propose a change in behavior for
master, that's material for a separate thread.

-- 
John Naylor
Amazon Web Services


Re: [PATCH] Document wal_compression=on

От:
Christoph Berg <myon@debian.org>
Дата:
Вложения:
Re: To John Naylor
> Or perhaps leave the door open for picking a better default in the future?
> 
>      The value on is currently an alias for pglz.

> Maybe we should also update the postgresql.conf.sample:

I'm attaching v2 that implements this (without the "currently").

Christoph

Re: [PATCH] Document wal_compression=on

От:
John Naylor <johncnaylorls@gmail.com>
Дата:
On Tue, Jun 30, 2026 at 5:19 PM Christoph Berg  wrote:
> >
> >      The value on is currently an alias for pglz.
>
> > Maybe we should also update the postgresql.conf.sample:
>
> I'm attaching v2 that implements this (without the "currently").

I pushed this with the change of using the language "historical
spelling" as mentioned upthread.

-- 
John Naylor
Amazon Web Services


FAQ