Skip to content
Snippets Groups Projects
checkpoint.sgml 1.68 KiB
Newer Older
<!-- doc/src/sgml/ref/checkpoint.sgml -->
  <refentrytitle>CHECKPOINT</refentrytitle>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>CHECKPOINT</refname>
  <refpurpose>force a transaction log checkpoint</refpurpose>
 <indexterm zone="sql-checkpoint">
  <primary>CHECKPOINT</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
CHECKPOINT
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   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 disk.  Refer to
   <xref linkend="wal-configuration"> for more details about what happens
   during a checkpoint.
  </para>

  <para>
   The <command>CHECKPOINT</command> command forces an immediate
   checkpoint when the command is issued, without waiting for a
   regular checkpoint scheduled by the system (controlled by the settings in
   <xref linkend="runtime-config-wal-checkpoints">).
   <command>CHECKPOINT</command> is not intended for use during normal
   operation.
  <para>
   If executed during recovery, the <command>CHECKPOINT</command> command
   will force a restartpoint (see <xref linkend="wal-configuration">)
   rather than writing a new checkpoint.
   Only superusers can call <command>CHECKPOINT</command>.
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   The <command>CHECKPOINT</command> command is a
   <productname>PostgreSQL</productname> language extension.
  </para>
 </refsect1>
</refentry>