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 1sS1d8-003BlS-O8 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2024 21:47:10 +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 1sS1d6-0012LE-80 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2024 21:47:08 +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 1sS1d5-0012L6-V6 for pgsql-hackers@lists.postgresql.org; Thu, 11 Jul 2024 21:47:07 +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 1sS1d2-001ceo-Fu for pgsql-hackers@lists.postgresql.org; Thu, 11 Jul 2024 21:47:07 +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 46BLkxsH2217360; Thu, 11 Jul 2024 17:46:59 -0400 From: Tom Lane To: Nathan Bossart cc: Jelte Fennema-Nio , Robert Haas , 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: <802ff3d5-fdc7-4b08-9046-2e9fc5fdae0e@oss.nttdata.com> <7c1b48d8-0f08-4733-a4e6-d55f04581db7@oss.nttdata.com> <1744272.1720624273@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Thu, 11 Jul 2024 15:42:26 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2217358.1720734419.1@sss.pgh.pa.us> Date: Thu, 11 Jul 2024 17:46:59 -0400 Message-ID: <2217359.1720734419@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Wed, Jul 10, 2024 at 01:41:41PM -0500, Nathan Bossart wrote: >> On Wed, Jul 10, 2024 at 11:11:13AM -0400, Tom Lane wrote: >>> 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. >> Do you remember the general timeframe or any of the GUCs involved? I spent >> some time searching through the commit log and mailing lists, but I've thus >> far only found allusions to past bad experiences with such hooks. > Could it be the effective_cache_size work from 2013-2014? Yeah, that's what I was remembering. It looks like my memory was slightly faulty, in that what ee1e5662d tried to do was make the default value of one GUC depend on the actual value of another one, not implement a consistency check per se. But the underlying problem is the same: a check_hook can't assume it is seeing the appropriate value of some other GUC, since a change of that one may be pending. regards, tom lane