CHECKPOINT is a database-level command that flushes all modified (dirty) data pages from memory to disk and records a log marker indicating that the data files are consistent up to that point. During crash recovery, the engine only needs to apply log records generated after the most recent checkpoint, significantly shortening restart time. Issuing CHECKPOINT does not commit or roll back any open transaction; it simply guarantees that everything already written to the transaction log is now durable in the data files. DBAs typically rely on the automatic checkpointing mechanism built into the engine, but manual checkpoints are useful before large bulk operations, after massive data changes, or prior to taking a file-system level backup. Because the operation is I/O intensive, frequent manual checkpoints can hurt performance if timed poorly. In SQL Server, you can optionally specify a target duration in seconds. PostgreSQL provides no parameters but requires superuser privileges. Other engines use different checkpointing mechanisms or vocabulary.
COMMIT, ROLLBACK, SAVEPOINT, BACKUP DATABASE, DBCC DROPCLEANBUFFERS, WAL (Write-Ahead Logging)
Sybase SQL Server 4.x (early 1990s); later adopted by Microsoft SQL Server and PostgreSQL 7.1
No. CHECKPOINT only flushes dirty pages and records a log marker. Your transaction remains active until you explicitly COMMIT or ROLLBACK.
In most workloads the automatic checkpointing process is sufficient. Manual checkpoints are helpful before maintenance tasks, bulk operations, or file-system snapshots when you need a guaranteed consistent on-disk state.
No. Only superusers or members of the pg_checkpoint role (from PostgreSQL 14 onward) can execute CHECKPOINT because it may cause heavy I/O across the entire cluster.
In SQL Server specify a checkpoint duration (e.g., CHECKPOINT 30) to let the engine throttle writes over a longer period. On PostgreSQL you cannot throttle a manual checkpoint, but you can adjust configuration parameters like checkpoint_completion_target and max_wal_size to influence automatic checkpoints.