Compress full-page images written to WAL.
At a glance
| Property | Value |
|---|---|
| Parameter | wal_compression |
| Category | WAL |
| Default | off |
| Value type | boolean / enum / numeric |
| Change scope | Superuser / reload |
What it does
Compresses full-page images in the WAL (since PG14 supports pglz, lz4, zstd). Trades CPU for reduced WAL volume and faster replication/archiving.
How to apply a change
Can be changed at runtime by a superuser for the current session, or globally via reload.
Inspect the current value and source with SHOW wal_compression; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'wal_compression';.
Tuning guidance
Enable lz4 or zstd (if built with support) on write-heavy systems to shrink WAL and archive size with modest CPU cost — usually a net win.