checkpoint: checkpoint activity
The last checkpoint, timed vs requested checkpoints, who writes dirty buffers, and the settings.
Captured on 2026-10-07 (UTC+08) on a local KingbaseES V008R006C009B0014 primary and standby, database test, using ~/kbdiag built from Go source commit 96c874f (static linux/amd64 binary). This is lab evidence, not production validation. Nothing was injected. Values belong to this capture only.
Usage
No options of its own. Connection options are the same as for sessions.
Primary
last checkpointis the time and theredoposition (with its WAL file) of the latest checkpoint.checkpointscounts timed and requested checkpoints since the statistics reset. “Requested” is not only WAL volume: a manualCHECKPOINT, a base backup (including a repmgr clone), a promotion, and creating or dropping a database count too. kbdiag gives the share but draws no conclusion. The server’s own “checkpoints too frequent” warning looks at the interval between two checkpoints (checkpoint_warning), which cumulative counters cannot give.buffers writtensplits dirty-buffer writes into three: the checkpointer, the background writer, and “backends and others”. The third is not “the checkpointer cannot keep up”: in PG12buffers_backendalso counts relation extension, the ring buffers of VACUUM and COPY, and the standby’s startup process, so an idle node can show 60-70% there (65% and 70% were measured in this lab).backend fsyncsabove 0 is shown, not reported as a WARN. It means an fsync request could not be handed to the checkpointer, which happens when the queue is full or the checkpointer was not running at that moment (9 was measured earlier on this lab’s node2, which kbha had restarted).settingsis the relevant parameters.- Display only, so any probe that is not collected makes the verdict UNKNOWN; OK means “all collected”, not “good numbers”.
Standby
- On a standby these are not restartpoint counts. In PG12 the checkpointer adds one for every attempt, and with no new checkpoint record it tries every 15 seconds (over four days that was 15917 attempts on this lab’s node2), so the text says
restartpoint attemptsand gives no ratio. - The header says the checkpoint record the last restartpoint started from was written by the primary: the time is the primary’s.
Exit codes
| Code | Meaning |
|---|---|
| 0 | OK |
| 3 | UNKNOWN: data not collected or not visible |
| 64 | Usage error |
| 69 | Cannot connect |