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 1oXCOz-0000GZ-2b for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Sep 2022 02:08:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oXCOx-0000UD-Oi for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Sep 2022 02:08:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXCOx-0000U4-F7 for pgsql-hackers@lists.postgresql.org; Sun, 11 Sep 2022 02:08:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXCOr-0002yA-BS for pgsql-hackers@lists.postgresql.org; Sun, 11 Sep 2022 02:08:50 +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 28B28eTp666418; Sat, 10 Sep 2022 22:08:40 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-hackers@lists.postgresql.org, Andres Freund Subject: Re: Splitting up guc.c In-reply-to: References: <587607.1662836699@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sun, 11 Sep 2022 09:43:08 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <666416.1662862120.1@sss.pgh.pa.us> Date: Sat, 10 Sep 2022 22:08:40 -0400 Message-ID: <666417.1662862120@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > One part that I have found a bit strange lately about guc.c is that we > have mix the core machinery with the SQL-callable parts. What do you > think about the addition of a gucfuncs.c in src/backend/utils/adt/ to > split things a bit more? I might be wrong, but I think the SQL-callable stuff makes use of some APIs that are currently private in guc.c. So we'd have to expose more API to make that possible. Maybe that wouldn't be a bad thing, but it seems to be getting beyond the original idea here. (Note I already had to expose find_option() in order to get the wal_consistency_checking stuff moved out.) It's not clear to me that "move the SQL-callable stuff" will end with a nice API boundary. regards, tom lane