pgconfigurator
pgconfigurator

wal_compression

No restart — reload (superuser)tuned by pgconfiguratorenum: off / on / lz4 / zstd / pglz

Compress full-page images written to WAL, shrinking WAL volume.

What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded

What it does

When wal_compression is enabled, PostgreSQL compresses the full-page images it writes to WAL (the page copies taken on the first change after a checkpoint). That can substantially reduce WAL size — and therefore WAL I/O, archiving, and replication bandwidth — at the cost of some CPU.

How to tune it

On most write-heavy systems the trade is favorable; lz4 (where available) offers a good speed/ratio balance, zstd compresses harder. Enable it if WAL volume or replication bandwidth is a concern and you have CPU headroom. Applies on reload.

FAQ

Which wal_compression method should I use?
lz4 is usually the sweet spot — fast with solid compression. zstd squeezes WAL smaller for a bit more CPU. pglz is the legacy option. Pick based on whether you're bound by CPU or by WAL/replication bandwidth.

Related parameters