Updated on 2025-10-23 GMT+08:00

CHECKPOINT

Description

A checkpoint is a point in the transaction log sequence at which all data files have been updated to reflect the information in the log. All data files will be flushed to a disk.

It sets transaction log checkpoints. By default, WALs periodically specify checkpoints in a transaction log. You may use gs_guc to specify GUC parameters checkpoint_segments, checkpoint_timeout, and incremental_checkpoint_timeout to adjust the atomized checkpoint intervals.

Precautions

  • Only the system administrator and O&M administrator can call CHECKPOINT.
  • CHECKPOINT forces an immediate checkpoint when the related command is issued, without waiting for a regular checkpoint scheduled by the system.

Syntax

CHECKPOINT;

Parameters

None

Examples

-- Set a checkpoint.
m_db=# CHECKPOINT;