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 1uL3Rt-00HQMz-4a for pgsql-hackers@arkaria.postgresql.org; Fri, 30 May 2025 17:23:17 +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 1uL3Rq-004CPX-6T for pgsql-hackers@arkaria.postgresql.org; Fri, 30 May 2025 17:23:14 +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 1uL3Rp-004CPP-TL for pgsql-hackers@lists.postgresql.org; Fri, 30 May 2025 17:23:13 +0000 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uL3Rm-000v2r-0k for pgsql-hackers@lists.postgresql.org; Fri, 30 May 2025 17:23:12 +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-103.mailbox.org (Postfix) with ESMTPS id 4b896y17mhz9shj; Fri, 30 May 2025 19:23:06 +0200 (CEST) Date: Fri, 30 May 2025 19:23:04 +0200 From: Christoph Berg To: Nathan Bossart Cc: Andres Freund , PostgreSQL Hackers Subject: Re: CHECKPOINT unlogged data Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4b896y17mhz9shj List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Nathan Bossart > This patch also adds an IMMEDIATE option, which I proposed some time ago > [0]. I ended up withdrawing it due to general skepticism about its Thanks for the pointer, I did not go that far back when looking for older threads. When writing the patch, I was also thinking about naming the option "fast" or "spread" but ultimately went with "immediate" because that's what the log message is using: =# checkpoint; 2025-05-30 18:23:17.433 CEST [579834] LOG: Checkpoint beginnt: immediate force wait SQL command "(options)" tend to be booleans, hence "immediate {on|off}". Introducing two separate keywords "fast" and "spread" seemed confusing, and there is no precedent for "fast=on" in other tools or the replication protocol. > usefulness. FWIW I have no concerns about adding a few retail options to > CHECKPOINT, but others might balk at options without solid use-cases. The > unlogged table one seems reasonable enough. I think the two options immediate and flush_all are actually useful in combination for the shutdown case. If operation is to continue normally until just before the shutdown, it might make sense to run these 3 commands (or just #1 and #3): checkpoint (flush_all, immediate false); checkpoint (flush_all); pg_ctl stop (I also thought about a VERBOSE option, but since the checkpoint messages are generated by a different process, it's probably harder than I initially thought.) Christoph