CHECKPOINT(7)

πŸ“¦ version 18.6, in opensuse-leap 16.0

πŸ’– CHECKPOINT β€” like, the manual page (section 7, bestie) πŸ’–

okay so welcome to CHECKPOINT(7), the glow-up edition. this is a PostgreSQL thing, section 7, and we're gonna talk about forcing a write-ahead log checkpoint. yes it's as iconic as it sounds. sit down, hydrate, let's go 🫢


✨ NAME ✨

CHECKPOINT β€” force a write-ahead log checkpoint πŸ’…


✨ SYNOPSIS ✨

CHECKPOINT

that's it. that's the whole vibe. one word, no arguments, no options. she's low maintenance and highkey powerful 😌


✨ DESCRIPTION ✨

okay so first things first, what even is a checkpoint? bestie. a checkpoint is a point in the write-ahead log sequence at which all data files have been updated to reflect the information in the log. and then β€” and this is the part that matters β€” all data files will be flushed to disk. every single one. the whole squad. πŸ¦‹

if you wanna know more about what actually goes down during a checkpoint, go read Section 28.5. it's giving required reading, ngl.

so what does the CHECKPOINT command do? it forces an immediate checkpoint right when the command is issued β€” it does not wait around for a regular checkpoint that the system would've scheduled on its own (that scheduling is controlled by the settings in Section 19.5.2). so yeah, you're basically skipping the line at the club. ✨

⚠️ real talk though: CHECKPOINT is not intended for use during normal operation. it's not a little everyday treat. it's a special-occasion thing. don't be out here just running it for funsies.

and here's a lil plot twist for you πŸŽ€ β€” if CHECKPOINT gets executed during recovery, it won't write a new checkpoint at all. instead it'll force a restartpoint (again, see Section 28.5). different name, different energy, same section, iykyk.

oh and permissions check πŸ‘‘ β€” only superusers, or users with the privileges of the pg_checkpoint role, can call CHECKPOINT. so if you try and it says no, that's why, bestie. it's not personal, it's privilege. πŸ’€


✨ COMPATIBILITY ✨

CHECKPOINT is a PostgreSQL language extension. so it's not standard SQL, it's our thing. she's built different, literally. 🌈


and that's the whole page, bestie!! this was PostgreSQL 18.6, dated 2026, and it's the CHECKPOINT(7) manual page. you ate. go flush something. πŸ§šπŸ’œ

πŸ“¦ where this page comes from