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 1sTln8-002ElH-Dc for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jul 2024 17:16:42 +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 1sTln6-002hVW-Ka for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jul 2024 17:16:40 +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 1sTln6-002hVO-AL for pgsql-hackers@lists.postgresql.org; Tue, 16 Jul 2024 17:16:40 +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.94.2) (envelope-from ) id 1sTlmy-002NDe-UW for pgsql-hackers@lists.postgresql.org; Tue, 16 Jul 2024 17:16:39 +0000 Received: from [192.168.11.3] (p4227034-ipxg13801funabasi.chiba.ocn.ne.jp [122.26.176.34]) by oss.nttdata.com (Postfix) with ESMTPSA id 822B5619AA; Wed, 17 Jul 2024 02:16:28 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <22585eb0-4a10-4d99-9914-bdee011e8778@oss.nttdata.com> Date: Wed, 17 Jul 2024 02:16:27 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal To: Nathan Bossart , Robert Haas Cc: pgsql-hackers@lists.postgresql.org References: <8a668c51-c6af-4744-a978-c6a2ce3b1d83@oss.nttdata.com> 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 2024/07/17 1:30, Nathan Bossart wrote: > On Tue, Jul 16, 2024 at 12:23:19PM -0400, Robert Haas wrote: >> TBH, I don't want to do that. I think it's too fragile. It's the sort >> of thing that just barely works given the exact behavior of these >> particular GUCs, but it relies on a bunch of subtle assumptions which >> won't be evident to future readers of the code. People will very >> possibly copy this barely-working code into other contexts where it >> doesn't work at all, or they'll think the code implementing this is >> buggy even if it isn't. > > Agreed. If there was really no other option, it would at the very least > need a humongous comment that explained why it worked in this specific case > and is unlikely to work in others. But it sounds like we have another > choice... I don't have another solution that can be pushed into v17. I understand the risks raised so far, so I'm okay with just pushing the "fast_forward" patch. It might be helpful to add a note to the summarize_wal documentation, for example, "summarize_wal can be enabled after startup with wal_level = minimal, but WAL generated at this level won't be summarized."? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION