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 1uPLmA-005kzx-HL for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jun 2025 13:45:58 +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 1uPLm8-003D4Y-H3 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jun 2025 13:45:57 +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 1uPLm8-003D4Q-7K for pgsql-hackers@lists.postgresql.org; Wed, 11 Jun 2025 13:45:56 +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 1uPLm5-001RpF-3D for pgsql-hackers@lists.postgresql.org; Wed, 11 Jun 2025 13:45:55 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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 4bHRkh50fQz9tsJ; Wed, 11 Jun 2025 15:45:48 +0200 (CEST) Date: Wed, 11 Jun 2025 15:45:46 +0200 From: Christoph Berg To: Nathan Bossart Cc: Fujii Masao , Andres Freund , PostgreSQL Hackers Subject: Re: CHECKPOINT unlogged data Message-ID: References: <7x6gsmev36zzh6lfzydkddbhpnxqgu2k2l2ci2k6foxhrstvj2@bn55g54wjrl4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Nathan Bossart > That seems like a good idea to me. I'm tempted to say that "fast" more > accurately describes what's happening than "immediate." "Immediate" sounds > like it happens instantaneously, but it's actually just happening "fast," > i.e., as fast as possible. Ack. > > #define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those > > * belonging to unlogged tables */ > > > > Maybe CHECKPOINT_FLUSH_UNLOGGED would be more explicit? > > WFM. Do we want to change the checkpoint log message (and the new options) only, or include the CHECKPOINT_* flags? (I would guess there aren't many external users of these flags, but mmmv.) > I thought it would make sense to put it closer to where these options are > described, since it'll be most evident for manually-initiated checkpoints. Ack, I'll add that. > >> We might also want to make sure it's clear that CHECKPOINT does nothing if > >> there's been no database activity since the last one (or, in the case of a > >> restartpoint, if there hasn't been a checkpoint record). > > > > That's taken care of by "force": > > > > #define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */ > > Oh, I see that we always specify that for CHECKPOINT commands, except for > restartpoints. IIRC even if you do specify CHECKPOINT_FORCE for a > restartpoint, it'll have no effect. It's proably worth mentioning that > case, at least. Right, will do. Christoph