Re: GUC values - recommended way to declare the C variables? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: GUC values - recommended way to declare the C variables?
Date
Msg-id Y1t/KC1hgZLxgwXK@paquier.xyz
Whole thread Raw
In response to Re: GUC values - recommended way to declare the C variables?  (Michael Paquier <michael@paquier.xyz>)
Responses Re: GUC values - recommended way to declare the C variables?  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Fri, Oct 28, 2022 at 11:48:13AM +0900, Michael Paquier wrote:
> Thanks.  I have not looked at the checkup logic yet, but the central
> declarations seem rather sane, and I have a few comments about the
> latter.

So, I've had the energy to look at the check logic today, and noticed
that, while the proposed patch is doing the job when loading the
in-core GUCs, nothing is happening for the custom GUCs that could be
loaded through shared_preload_libraries or just from a LOAD command.

After adding an extra check in define_custom_variable() (reworking a
bit the interface proposed while on it), I have found a few more
issues than what's been already found on this thread:
- 5 missing spots in pg_stat_statements.
- 3 float rounding issues in pg_trgm.
- 1 spot in pg_prewarm.
- A few more that had no initialization, but these had a default of
false/0/0.0 so it does not influence the end result but I have added
some initializations anyway.

With all that addressed, I am finishing with the attached.  I have
added some comments for the default definitions depending on the
CFLAGS, explaining the reasons behind the choices made.  The CI has
produced a green run, which is not the same as the buildfarm, still
gives some confidence.

Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: Re: Code checks for App Devs, using new options for transaction behavior
Next
From: Michael Paquier
Date:
Subject: Re: psql: Add command to use extended query protocol