Re: gen_guc_tables improvements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: gen_guc_tables improvements
Date
Msg-id abkTgKpdhhTS5-je@paquier.xyz
Whole thread Raw
In response to Re: gen_guc_tables improvements  (Zsolt Parragi <zsolt.parragi@percona.com>)
List pgsql-hackers
On Mon, Mar 16, 2026 at 05:57:39AM +0000, Zsolt Parragi wrote:
> Yes, but by convention dot is only used by extensions to mark the
> prefix/namespace of the extension (<extension_name>.<guc_name>). None
> of the core server GUCs use it. The point of this script isn't to
> ensure that the generated C code will compile, but to prevent hidden
> errors and ensure we follow existing proper coding conventions.

I am not sure that it is a good idea to enforce that in the script
this way, to be honest.  There may be a point about this new rule
being annoying for forks of the core code, at least, where they would
like to add their own parameters with dots in the names.  I have done
that in the past, as one example, and I am sure that there are
projects out there that do so, meaning the requirement to live with
one more custom patch to make things work if this rule is enforced in
gen_guc_tables.pl.

Saying that, as far as I can see 0001 and 0003 will save some time
when inserting some incorrect data.  The case of duplicated names was
indeed confusing, and 0003 can save from typos when specifying
non-mandatory fields.  So I have applied these two.

0004 has some value here, to save the .dat from copy-paste bloat.  I
am wondering what others think about it.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Report bytes and transactions actually sent downtream
Next
From: Kirill Reshke
Date:
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)