PostgreSQL

Undersized max_wal_size triggers frequent checkpoints and I/O spikes

warning
performanceUpdated Jan 21, 2026
Technologies:
How to detect:

When WAL growth exceeds max_wal_size before checkpoint_timeout, PostgreSQL forces a checkpoint to reclaim WAL space. This creates unplanned I/O spikes. Visible as high requested checkpoints vs timed checkpoints in pg_stat_bgwriter.

Recommended action:

Monitor checkpoint_requested vs checkpoint_timed in pg_stat_bgwriter. If requested checkpoints dominate, increase max_wal_size. Document recommends 4GB for OLTP, 16GB for OLAP. Enable checkpoint_warning=30s to log frequent checkpoints. Size max_wal_size based on checkpoint_timeout and write rate.