From 2f698d7f4b7b4c49c3649b2fcc063eb66f9d2e6c Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 11 Jul 2025 11:51:25 -0500 Subject: 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 Reviewed-by: Andres Freund Reviewed-by: Fujii Masao Reviewed-by: Laurenz Albe Reviewed-by: Dilip Kumar Discussion: https://postgr.es/m/aDnaKTEf-0dLiEfz%40msg.df7cb.de --- doc/src/sgml/ref/checkpoint.sgml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'doc/src') 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 [, ...] ) ] where option can be one of: + + MODE { FAST | SPREAD } @@ -39,14 +41,24 @@ CHECKPOINT [ ( option [, ...] ) ] - The CHECKPOINT command forces a fast + By default, the CHECKPOINT 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 ). + To request the checkpoint be spread over a longer interval, set the + MODE option to SPREAD. CHECKPOINT is not intended for use during normal operation. + + 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. + + If executed during recovery, the CHECKPOINT command will force a restartpoint (see ) @@ -63,8 +75,25 @@ CHECKPOINT [ ( option [, ...] ) ] Parameters - - + + + MODE + + + When set to FAST, 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. + + + MODE can also be set to SPREAD to + request the checkpoint be spread over a longer interval (controlled via + the settings in ), like a + regular checkpoint scheduled by the system. This can reduce the rate of + I/O during the checkpoint. + + + + -- cgit v1.2.3