checkpoint: checkpoints, bgwriter, and buffer writes
Inspect the last checkpoint/restartpoint, cumulative bgwriter/backend buffer writes, average rates, and checkpoint GUCs.
Reads sys_control_checkpoint(), sys_stat_bgwriter, and checkpoint GUCs (checkpoint_timeout, max_wal_size, checkpoint_completion_target, checkpoint_warning, log_checkpoints). Read-only: never runs CHECKPOINT.
Counters accumulate since
stats_reset; on standbys,checkpoints_timedcounts restartpoint attempts (one try every 15s when no new checkpoint record arrives) and does not compare directly with primary counts.
Usage
Key Options
| Option | Effect |
|---|---|
--json | Emit structured JSON (checkpoint.last, checkpoint.stats, checkpoint.settings) |
Verdict & Reading Output
OK(exit=0): All three probes succeeded (informational metrics — cumulative counters are shown, never turned into synthetic alarms).UNKNOWN(exit=3): Any checkpoint probe failed, timed out, or lacked permission.[NEXT]hints: Guides tokbdiag walwhencheckpoints_req > checkpoints_timedorbuffers_backend_fsync > 0, and noteslog_checkpoints = onwhen disabled.
Example (KES V9 Primary, COLUMNS=80)
Related Commands
kbdiag wal— inspect WAL footprint,max_wal_size, slots, and archiver retentionkbdiag wal(wal archive) — check archiver success/failure and.readyqueuekbdiag progress— inspect an in-progressCHECKPOINT