wal_compression
A server parameter determining whether WAL should be compressed
wal_compression
is a configuration parameter determining whether full page images should be compressed.
wal_compression
was added in PostgreSQL 9.5.
Default value
The default value for wal_compression
is: off.
Usage
In PostgreSQL 14 and earlier, wal_compression
was a boolean setting, with "on
" enabling PostgreSQL's built-in compression method.
From PostgreSQL 15, following values are permitted, depending on how PostgreSQL was compiled:
off
pglz
(alias:on
)lz4
(if PostgreSQL was compiled with--with-lz4
)zstd
(if PostgreSQL was compiled with--with-zstd
)
Change history
- PostgreSQL 15
- PostgreSQL 9.5
- added (commit 57aa5b2b)
References
- PostgreSQL documentation: wal_compression
Useful links
- WAL Compression in PostgreSQL and Recent Improvements in Version 15 - January 2023 blog article by Jobin Augustine / Percona
- About wal_compression on PostgreSQL - May 2019 blog article by Fabio Pardi / Portavita
- PostgreSQL underused features – WAL compression - June 2016 blog article by Kaarel Moppel / Cybertec