Skip to main content

WAL and checkpoint tuning

WAL-related recommendations are driven by observed WAL generation rate from performance samples and checkpoint statistics.

max_wal_size

The recommendation compares observed WAL generation against checkpoint behavior and the current max_wal_size. It accounts for PostgreSQL checkpoint timing behavior and leaves headroom for bursts, but the exact sizing formula is intentionally not published.

The important distinction is whether requested checkpoints appear to be caused by application WAL pressure or by administrative/provider activity. If WAL pressure is not evident, pocketPG shows an informational insight rather than recommending a larger WAL budget.

min_wal_size

The companion min_wal_size recommendation is kept proportional to max_wal_size so PostgreSQL can recycle WAL segments efficiently during bursty workloads.

wal_compression

wal_compression is recommended when the evidence suggests WAL volume is large enough for compression to matter. The recommendation is framed as a tradeoff: lower WAL volume in exchange for additional CPU work.

Checkpoint diagnosis

The evidence panel classifies the checkpoint pattern without exposing the internal thresholds:

PatternMeaning
WAL pressureApplication write volume is likely forcing checkpoints sooner than desired.
Administrative/provider activityCheckpoints are likely caused by backup, maintenance, or managed-provider housekeeping.
Mixed or inconclusiveMonitor longer before changing WAL settings.