wal_compression = on: what is the algorithm?

Started by PG Bug reporting formover 1 year ago3 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/runtime-config-wal.html
Description:

In
https://www.postgresql.org/docs/16/runtime-config-wal.html#GUC-WAL-COMPRESSION,
the option "on" is not described:

“The supported methods are pglz, lz4 (if PostgreSQL was compiled with
--with-lz4) and zstd (if PostgreSQL was compiled with --with-zstd). The
default value is off. ”

"on" was an available option before PG 15, and still seen in some docs.
If I understand the code in src/backend/utils/misc/guc_tables.c, "on" is the
same as "pglz". So I suggest:

“The supported methods are pglz, lz4 (if PostgreSQL was compiled with
--with-lz4) and zstd (if PostgreSQL was compiled with --with-zstd). The
default value is off. The value on is synonym of pglz.”

I didn't see this discussed in
/messages/by-id/3037310D-ECB7-4BF1-AF20-01C10BB33A33@yandex-team.ru

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: wal_compression = on: what is the algorithm?

On Fri, Nov 15, 2024 at 03:30:59PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/runtime-config-wal.html
Description:

In
https://www.postgresql.org/docs/16/runtime-config-wal.html#GUC-WAL-COMPRESSION,
the option "on" is not described:

“The supported methods are pglz, lz4 (if PostgreSQL was compiled with
--with-lz4) and zstd (if PostgreSQL was compiled with --with-zstd). The
default value is off. ”

"on" was an available option before PG 15, and still seen in some docs.
If I understand the code in src/backend/utils/misc/guc_tables.c, "on" is the
same as "pglz". So I suggest:

“The supported methods are pglz, lz4 (if PostgreSQL was compiled with
--with-lz4) and zstd (if PostgreSQL was compiled with --with-zstd). The
default value is off. The value on is synonym of pglz.”

I think we kept 'on' just for backward compatibility, so we don't
mention it in the docs anymore.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

When a patient asks the doctor, "Am I going to die?", he means
"Am I going to die soon?"

#3Michael Paquier
michael@paquier.xyz
In reply to: Bruce Momjian (#2)
Re: wal_compression = on: what is the algorithm?

On Wed, Nov 20, 2024 at 11:22:51AM -0500, Bruce Momjian wrote:

I think we kept 'on' just for backward compatibility, so we don't
mention it in the docs anymore.

True, but we show it based on wal_compression_options and list it in
postgresql.conf.sample. So we could as well add this extra line about
"on" matching with pglz knowing that the docs mention "off".
Christophe's suggestion sounds like a good thing, IMO.
--
Michael