Debian Codegraph @

doc/src/sgml/ref/checkpoint.sgml

raw
1 <!--
2 doc/src/sgml/ref/checkpoint.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="sql-checkpoint">
7 <indexterm zone="sql-checkpoint">
8 <primary>CHECKPOINT</primary>
9 </indexterm>
10
11 <refmeta>
12 <refentrytitle>CHECKPOINT</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18 <refname>CHECKPOINT</refname>
19 <refpurpose>force a write-ahead log checkpoint</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <synopsis>
24 CHECKPOINT
25 </synopsis>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>
32 A checkpoint is a point in the write-ahead log sequence at which
33 all data files have been updated to reflect the information in the
34 log. All data files will be flushed to disk. Refer to
35 <xref linkend="wal-configuration"/> for more details about what happens
36 during a checkpoint.
37 </para>
38
39 <para>
40 The <command>CHECKPOINT</command> command forces an immediate
41 checkpoint when the command is issued, without waiting for a
42 regular checkpoint scheduled by the system (controlled by the settings in
43 <xref linkend="runtime-config-wal-checkpoints"/>).
44 <command>CHECKPOINT</command> is not intended for use during normal
45 operation.
46 </para>
47
48 <para>
49 If executed during recovery, the <command>CHECKPOINT</command> command
50 will force a restartpoint (see <xref linkend="wal-configuration"/>)
51 rather than writing a new checkpoint.
52 </para>
53
54 <para>
55 Only superusers or users with the privileges of
56 the <xref linkend="predefined-role-pg-checkpoint"/>
57 role can call <command>CHECKPOINT</command>.
58 </para>
59 </refsect1>
60
61 <refsect1>
62 <title>Compatibility</title>
63
64 <para>
65 The <command>CHECKPOINT</command> command is a
66 <productname>PostgreSQL</productname> language extension.
67 </para>
68 </refsect1>
69 </refentry>