Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZcF0-005rv0-JB for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Jul 2025 21:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uZcEx-004NHT-Fo for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Jul 2025 21:22:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZcEx-004NG5-5n for pgsql-hackers@lists.postgresql.org; Wed, 09 Jul 2025 21:22:07 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uZcEv-006jBd-0b for pgsql-hackers@lists.postgresql.org; Wed, 09 Jul 2025 21:22:07 +0000 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4bcrX92zFvz9t5m; Wed, 9 Jul 2025 23:22:01 +0200 (CEST) Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of cb@df7cb.de designates 2001:67c:2050:b231:465::202 as permitted sender) smtp.mailfrom=cb@df7cb.de Date: Wed, 9 Jul 2025 23:21:59 +0200 From: Christoph Berg To: Nathan Bossart Cc: Laurenz Albe , Fujii Masao , Andres Freund , PostgreSQL Hackers Subject: Re: CHECKPOINT unlogged data Message-ID: References: <086ab9ad5a2c06eb16f6f4e50a04764ba6fafd1b.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4bcrX92zFvz9t5m List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 > > > > - Sets checkpoint mode to fast (immediate) or spread (the default) > + Sets checkpoint mode to fast or spread (the default) > (see ). This is somewhat hard to parse, perhaps combine the two ()() into one: Sets checkpoint mode to fast or spread (the default is spread, see ). (patch 4) > > - The CHECKPOINT command forces a fast > + When MODE is set to FAST, which is the > + 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 > ). Explaining what the option does when explicitly setting the default is confusing. We should explain the opposite case instead: The CHECKPOINT command issues a fast checkpoint by default where writes run at full speed. When literal>MODE is set to SPREAD, writes are instead limited by the settings in . (patch 5) > > + > + FLUSH_UNLOGGED > + > + > + Normally, CHECKPOINT does not flush data files for > + unlogged relations. This option, which is disabled by default, enables > + flushing unlogged relations. More precise: Normally, CHECKPOINT does not flush dirty buffers of unlogged relations. This option, which is disabled by default, enables flushing unlogged relations to disk. Christoph