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 1uNUMK-0034lO-EK for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jun 2025 10:31:36 +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 1uNUMI-007pmu-Bp for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jun 2025 10:31:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uNUMI-007pkK-25 for pgsql-hackers@lists.postgresql.org; Fri, 06 Jun 2025 10:31:34 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uNUMF-000Yob-37 for pgsql-hackers@lists.postgresql.org; Fri, 06 Jun 2025 10:31:33 +0000 Received: from [192.168.11.2] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id 3E87C61904; Fri, 6 Jun 2025 19:31:26 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Fri, 6 Jun 2025 19:31:25 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: CHECKPOINT unlogged data To: Christoph Berg , Andres Freund Cc: Nathan Bossart , PostgreSQL Hackers References: <7x6gsmev36zzh6lfzydkddbhpnxqgu2k2l2ci2k6foxhrstvj2@bn55g54wjrl4> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/06/06 19:03, Christoph Berg wrote: > Re: Andres Freund >> I'd add a 'mode' that can be set to an arbitrary string, which then can be >> validated in C code. That seems more future proof. > > Changed in the attached v2, thanks. When I applied the patch and compiled it, I got the following warnings: utility.c:946:4: warning: label followed by a declaration is a C23 extension [-Wc23-extensions] 946 | CheckPointStmt *stmt = (CheckPointStmt *) parsetree; | ^ utility.c:947:16: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement] 947 | ListCell *lc; | ^ 2 warnings generated. RequestCheckpoint(CHECKPOINT_WAIT | + (immediate ? CHECKPOINT_IMMEDIATE : 0) | + (flush_all ? CHECKPOINT_FLUSH_ALL : 0) | Some users might want to trigger a spread checkpoint but not wait for it to finish, since it could take a long time? If that's a valid use case, maybe we should add a WAIT option to let users choose whether to wait for the checkpoint to complete or not? Regards, -- Fujii Masao NTT DATA Japan Corporation