diff options
author | Nathan Bossart | 2025-07-11 16:51:25 +0000 |
---|---|---|
committer | Nathan Bossart | 2025-07-11 16:51:25 +0000 |
commit | 2f698d7f4b7b4c49c3649b2fcc063eb66f9d2e6c (patch) | |
tree | 388d0efadcf8844c59216bf0616f9418b811cba4 /doc | |
parent | a4f126516e688736bfed332b44a0c221b8dc118a (diff) |
Add MODE option to CHECKPOINT command.
This option may be set to FAST (the default) to request the
checkpoint be completed as fast as possible, or SPREAD to request
the checkpoint be spread over a longer interval (based on the
checkpoint-related configuration parameters). Note that the server
may consolidate the options for concurrently requested checkpoints.
For example, if one session requests a "fast" checkpoint and
another requests a "spread" checkpoint, the server may perform one
"fast" checkpoint.
Author: Christoph Berg <myon@debian.org>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Discussion: https://postgr.es/m/aDnaKTEf-0dLiEfz%40msg.df7cb.de
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/sgml/ref/checkpoint.sgml | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/checkpoint.sgml b/doc/src/sgml/ref/checkpoint.sgml index fad5e982d03..36a9e323f44 100644 --- a/doc/src/sgml/ref/checkpoint.sgml +++ b/doc/src/sgml/ref/checkpoint.sgml @@ -24,6 +24,8 @@ PostgreSQL documentation CHECKPOINT [ ( option [, ...] ) ] <phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase> + + MODE { FAST | SPREAD } </synopsis> </refsynopsisdiv> @@ -39,15 +41,25 @@ CHECKPOINT [ ( option [, ...] ) ] </para> <para> - The <command>CHECKPOINT</command> command forces a fast + By default, the <command>CHECKPOINT</command> command forces a fast 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"/>). + To request the checkpoint be spread over a longer interval, set the + <literal>MODE</literal> option to <literal>SPREAD</literal>. <command>CHECKPOINT</command> is not intended for use during normal operation. </para> <para> + The server may consolidate concurrently requested checkpoints. Such + consolidated requests will contain a combined set of options. For example, + if one session requests a fast checkpoint and another requests a spread + checkpoint, the server may combine those requests and perform one fast + checkpoint. + </para> + + <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. @@ -63,8 +75,25 @@ CHECKPOINT [ ( option [, ...] ) ] <refsect1> <title>Parameters</title> - <para> - </para> + <variablelist> + <varlistentry> + <term><literal>MODE</literal></term> + <listitem> + <para> + When set to <literal>FAST</literal>, which is the default, the requested + checkpoint will be completed as fast as possible, which may result in a + significantly higher rate of I/O during the checkpoint. + </para> + <para> + <literal>MODE</literal> can also be set to <literal>SPREAD</literal> to + request the checkpoint be spread over a longer interval (controlled via + the settings in <xref linkend="runtime-config-wal-checkpoints"/>), like a + regular checkpoint scheduled by the system. This can reduce the rate of + I/O during the checkpoint. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1> |