Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXpNv-0008EP-4Y for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2022 19:46:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oXpNt-0004Ow-IG for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2022 19:46:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXpNt-0004Om-8m for pgsql-hackers@lists.postgresql.org; Mon, 12 Sep 2022 19:46:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXpNm-0003qP-Sm for pgsql-hackers@lists.postgresql.org; Mon, 12 Sep 2022 19:46:20 +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 28CJkAxP1771846; Mon, 12 Sep 2022 15:46:10 -0400 From: Tom Lane To: Andres Freund cc: Michael Paquier , pgsql-hackers@lists.postgresql.org Subject: Re: Splitting up guc.c In-reply-to: <20220912193928.wgrccx4b4k3solpu@awork3.anarazel.de> References: <587607.1662836699@sss.pgh.pa.us> <666417.1662862120@sss.pgh.pa.us> <925946.1662918775@sss.pgh.pa.us> <1305798.1662935501@sss.pgh.pa.us> <20220912193928.wgrccx4b4k3solpu@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 12 Sep 2022 12:39:28 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1771844.1663011970.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 12 Sep 2022 15:46:10 -0400 Message-ID: <1771845.1663011970@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > - a bit worried that in_hot_standby will be confusing due vs InHotStandb= y. I > wonder if we could perhaps get rid of an underlying variable in cases = where > we really just need the GUC entry to trigger the show hook? Yeah, that worried me too. We do need the variable because guc.c checks it directly, but let's use a less confusing name. in_hot_standby_guc, maybe? > - perhaps too annoying, but it'd be easier to review this if the functio= n > renaming were done in a preparatory patch There were only a couple that I renamed, and I don't think any of them should be directly referenced by anything else. > - Are all those includes in guc_tables.c still necessary? The ones that are still there are necessary. I believe they're mostly pulling in variables that are GUC targets. > - It's a bit depressing that the GUC arrays aren't const, . But I guess = that's > better fixed separately. Dunno that it'd be helpful, unless we separate the variable and constant parts of the structs. > I think this is localized enough that asking people to manually resolve = a > conflict around adding a GUC entry wouldn't be asking for that much. And= I > think plenty changes might be automatically resolvable, despite the rena= me. I wonder whether git will be able to figure out that this is mostly a code move. I would expect so for a straight file rename, but will that work when we're splitting the file 3 ways? regards, tom lane