<!--
$Id$
Postgres documentation
-->

<refentry id="SQL-CHECKPOINT">
 <refmeta>
  <refentrytitle id="SQL-CHECKPOINT-TITLE">
   CHECKPOINT
  </refentrytitle>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>
 <refnamediv>
  <refname>
   CHECKPOINT
  </refname>
  <refpurpose>
   Forces a checkpoint in the transaction log
  </refpurpose>
  
  </refnamediv>
 <refsynopsisdiv>
  <refsynopsisdivinfo>
   <date>2001-01-23</date>
  </refsynopsisdivinfo>
  <synopsis>  
CHECKPOINT
  </synopsis>
  
  <refsect2 id="R2-SQL-CHECKPOINT-1">
   <refsect2info>
    <date>20001-01-23</date>
   </refsect2info>
   <title>
    Inputs
   </title>
   <para>
None
   </para>
  </refsect2>
  
  <refsect2 id="R2-SQL-CHECKPOINT-2">
   <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    Outputs
   </title>

   <para>
    <variablelist>
     <varlistentry>
      <term><computeroutput>
CHECKPOINT
       </computeroutput></term>
      <listitem>
       <para>
	This signifies that a checkpoint has been placed into the transaction log.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
 </refsynopsisdiv>
 
 <refsect1 id="R1-SQL-CHECKPOINT-1">
  <refsect1info>
   <date>2001-01-23</date>
  </refsect1info>
  <title>
   Description
  </title>

  <para>
   Write-Ahead Logging (WAL) puts a checkpoint in the log every 300 seconds
by default.  (This may be changed by the parameter CHECKPOINT_TIMEOUT in
<Filename>postgresql.conf</Filename>.)
  </para>

  <para>
The CHECKPOINT command forces a checkpoint at the point at which the command
is issued.  The next automatic checkpoint will happen the default time
after the forced checkpoint.
  </para>
  
  <refsect2 id="R2-SQL-CHECKPOINT-3">
   <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    Restrictions
   </title>
   <para>
    Use of the CHECKPOINT command is restricted to users with administrative
access.
   </para>
  </refsect2>
 </refsect1>

 <refsect1 id="R1-SQL-CHECKPOINT-2">
  <title>
   Usage
  </title>

  <para>
   To force a checkpoint in the transaction log:

  <programlisting>
CHECKPOINT;
  </programlisting>
  </para>
 </refsect1>
 
 <refsect1 id="R1-SQL-CHECKPOINT-3">
  <title>
   Compatibility
  </title>

  <refsect2 id="R2-SQL-CHECKPOINT-4">
     <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    SQL92
   </title>

   <para>
    <command>CHECKPOINT</command>
    is a <productname>Postgres</productname> language extension.
    There is no  <command>CHECKPOINT</command>
    command in <acronym>SQL92</acronym>.

    <note>
     <para>
      The handling of database storage and logging is a matter that the
standard leaves to the implementation.
     </para>
    </note>
   </para>
  </refsect2>
 </refsect1>
</refentry>
 
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
