pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: CHECKPOINT unlogged data
Date: Wed, 9 Jul 2025 23:21:59 +0200
Message-ID: <aG7ddyB-ESzJYAYp@msg.df7cb.de> (raw)
In-Reply-To: <aG7Cbf9dju1kkzGE@nathan>
References: <aEmIijETyhj9DsWG@msg.df7cb.de>
	<aEmLzinvZ-W8EPiW@nathan>
	<aEmma1MPm_UgmLP3@msg.df7cb.de>
	<086ab9ad5a2c06eb16f6f4e50a04764ba6fafd1b.camel@cybertec.at>
	<aFAsCyMj-mybBlv3@msg.df7cb.de>
	<aFA10XSdJ9hPGfD1@nathan>
	<aFA7ustE2APIMehs@msg.df7cb.de>
	<aFLmE2zl038I7-F1@nathan>
	<aFMc3SheeQxl0QYb@msg.df7cb.de>
	<aG7Cbf9dju1kkzGE@nathan>

Re: Nathan Bossart
> Here is what I have staged for commit, which I'm planning to do on Friday.

> diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
> index 9659f76042c..9be752fc12b 100644
> --- a/doc/src/sgml/ref/pg_basebackup.sgml
> +++ b/doc/src/sgml/ref/pg_basebackup.sgml
> @@ -500,7 +500,7 @@ PostgreSQL documentation
>        <term><option>--checkpoint={fast|spread}</option></term>
>        <listitem>
>         <para>
> -        Sets checkpoint mode to fast (immediate) or spread (the default)
> +        Sets checkpoint mode to fast or spread (the default)
>          (see <xref linkend="backup-lowlevel-base-backup"/>).

This is somewhat hard to parse, perhaps combine the two ()() into one:

        Sets checkpoint mode to fast or spread (the default is spread,
        see <xref linkend="backup-lowlevel-base-backup"/>).

(patch 4)
>    <para>
> -   The <command>CHECKPOINT</command> command forces a fast
> +   When <literal>MODE</literal> is set to <literal>FAST</literal>, which is the
> +   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"/>).

Explaining what the option does when explicitly setting the default is
confusing. We should explain the opposite case instead:

  The <command>CHECKPOINT</command> command issues a fast checkpoint
  by default where writes run at full speed. When literal>MODE</literal>
  is set to <literal>SPREAD</literal>, writes are instead limited
  by the settings in <xref linkend="runtime-config-wal-checkpoints"/>.

(patch 5)
>    <variablelist>
> +   <varlistentry>
> +    <term><literal>FLUSH_UNLOGGED</literal></term>
> +    <listitem>
> +     <para>
> +      Normally, <command>CHECKPOINT</command> does not flush data files for
> +      unlogged relations.  This option, which is disabled by default, enables
> +      flushing unlogged relations.

More precise:

      Normally, <command>CHECKPOINT</command> does not flush dirty buffers of
      unlogged relations.  This option, which is disabled by default, enables
      flushing unlogged relations to disk.

Christoph





view thread (34+ messages)  latest in thread

Message-ID: <aG7ddyB-ESzJYAYp@msg.df7cb.de>
Permalink:  ../aG7ddyB-ESzJYAYp@msg.df7cb.de/
Also on:    postgresql.org/message-id/aG7ddyB-ESzJYAYp@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: myon@debian.org, nathandbossart@gmail.com, laurenz.albe@cybertec.at, masao.fujii@oss.nttdata.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: CHECKPOINT unlogged data
  In-Reply-To: <aG7ddyB-ESzJYAYp@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox