Re: Splitting up guc.c
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2022-09-11T00:43:08Z
Lists: pgsql-hackers
On Sat, Sep 10, 2022 at 03:04:59PM -0400, Tom Lane wrote: > Before proceeding further, I wanted to ask for comments on a design > choice that might be controversial. Even though I don't want to > invent guc_hooks.c, I think we *should* invent guc_hooks.h, and > consolidate all the GUC hook function declarations there. The > point would be to not have to #include guc.h in headers of unrelated > modules. This is similar to what we've done with utils/fmgrprotos.h, > though the motivation is different. I already moved a few declarations > from guc.h to there (and in consequence had to adjust #includes in > the modules defining those hooks), but there's a lot more to be done > if we apply that policy across the board. Does anybody think that's > a bad approach, or have a better one? 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? -- Michael
Commits
-
Split up guc.c for better build speed and ease of maintenance.
- 0a20ff54f5e6 16.0 landed