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 1sP1j0-002WpW-8B for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2024 15:16:50 +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 1sP1ix-00AHzg-RC for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2024 15:16:48 +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 1sP1ix-00AHzY-HQ for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2024 15:16:48 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP1iv-000EoH-OW for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2024 15:16:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 463FGgIG3253791; Wed, 3 Jul 2024 11:16:42 -0400 From: Tom Lane To: Nathan Bossart cc: Fujii Masao , pgsql-hackers@lists.postgresql.org Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal In-reply-to: References: <6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com> Comments: In-reply-to Nathan Bossart message dated "Wed, 03 Jul 2024 09:29:50 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3253788.1720019802.1@sss.pgh.pa.us> Date: Wed, 03 Jul 2024 11:16:42 -0400 Message-ID: <3253790.1720019802@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > This sort of thing comes up enough that perhaps we should add a > better-supported way to deal with GUCs that depend on each other... Yeah, a GUC check hook that tries to inspect the value of some other GUC is generally going to create more problems than it solves; we've learned that the hard way in the past. We have your patch to remove one instance of that on the CF queue: https://www.postgresql.org/message-id/flat/ZnMr2k-Nk5vj7T7H@nathan But that fix only works because those GUCs are PGC_POSTMASTER and so we can perform a consistency check on them after GUC setup. I'm not sure what a more general consistency check mechanism would look like, but it would have to act at some other point than the check_hooks do. regards, tom lane