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 1sRZrK-00GeHu-KC for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 16:07: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 1sRZrJ-006yFb-AB for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 16:07:57 +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 1sRZrJ-006yFT-0a for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 16:07:57 +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 1sRZrG-001Oht-2B for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 16:07:55 +0000 Received: from [192.168.11.2] (p3952216-ipxg13501funabasi.chiba.ocn.ne.jp [122.16.205.216]) by oss.nttdata.com (Postfix) with ESMTPSA id 3F3E2619B9; Thu, 11 Jul 2024 01:07:52 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <8088ebdf-247d-4014-b6f9-a1d800aabded@oss.nttdata.com> Date: Thu, 11 Jul 2024 01:07:51 +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 Content-Language: en-US To: Nathan Bossart , Tom Lane Cc: Jelte Fennema-Nio , Robert Haas , pgsql-hackers@lists.postgresql.org References: <6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com> <802ff3d5-fdc7-4b08-9046-2e9fc5fdae0e@oss.nttdata.com> <7c1b48d8-0f08-4733-a4e6-d55f04581db7@oss.nttdata.com> <1744272.1720624273@sss.pgh.pa.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/11 0:44, Nathan Bossart wrote: > On Wed, Jul 10, 2024 at 11:11:13AM -0400, Tom Lane wrote: >> Please, no. We went through a ton of permutations of that kind of >> idea years ago, when it first became totally clear that cross-checks >> between GUCs do not work nicely if implemented in check_hooks. >> (You can find all the things we tried in the commit log, although >> I don't recall exactly when.) > > Understood. > >> A counter-example for what you just >> said is when a configuration file like the above is loaded after >> postmaster start. > > I haven't tested it, but from skimming around the code, it looks like > ProcessConfigFileInternal() would deduplicate any previous entries in the > file prior to applying the values and running the check hooks. Else, > reloading a configuration file with multiple startup-only GUC entries could > fail, even without bogus GUC check hooks. Yeah, I'm thinking the same. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION