Re: GUC values - recommended way to declare the C variables?

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: GUC values - recommended way to declare the C variables?
Date: 2022-10-25 03:43:43
Message-ID: CAHut+Pss16YBiYYKyrZBvSp_4uSQfCy7aYfDXU0N8w5VZ5dd_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 20, 2022 at 6:52 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Thu, Oct 20, 2022 at 3:16 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> >
> > On Thu, Oct 20, 2022 at 11:56:58AM +1100, Peter Smith wrote:
> > > Patch 0002 adds a sanity-check function called by
> > > InitializeGUCOptions, as suggested by Tom [2]. This is to ensure that
> > > the GUC C variable initial values are sensible and/or have not gone
> > > stale compared with the compiled-in defaults of guc_tables.c. This
> > > patch also changes some GUC C variable initial values which were
> > > already found (by this sanity-checker) to be different.
> >
> > I like it.
> >
> > However it's fails on windows:
> >
> > https://cirrus-ci.com/task/5545965036765184
> >
> > running bootstrap script ... FATAL: GUC (PGC_BOOL) update_process_title, boot_val=0, C-var=1
> >
> > Maybe you need to exclude dynamically set gucs ?
> > See also this other thread, where I added a flag identifying exactly
> > that. https://commitfest.postgresql.org/40/3736/
> > I need to polish that patch some, but maybe it'll be useful for you, too.
> >

PSA patch set v3.

This is essentially the same as before except now, utilizing the
GUC_DEFAULT_COMPILE flag added by Justin's patch [1], the sanity-check
skips over any dynamic compiler-dependent GUCs.

Patch 0001 - GUC trivial mods to logical replication GUC C var declarations
Patch 0002 - (TMP) Justin's patch adds the GUC_DEFAULT_COMPILE flag
support -- this is now a prerequisite for 0003
Patch 0003 - GUC sanity-check comparisons of GUC C var declarations
with the GUC defaults from guc_tables.c

------
[1] Justin's patch of 24/Oct -
https://www.postgresql.org/message-id/20221024220544.GJ16921%40telsasoft.com

Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v3-0003-GUC-C-variable-sanity-check.patch application/octet-stream 8.1 KB
v3-0001-GUC-tidy-some-C-variable-declarations.patch application/octet-stream 2.2 KB
v3-0002-TMP-Justins-DYNAMIC_DEFAULT-patch.patch application/octet-stream 12.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2022-10-25 03:46:10 Re: fixing typo in comment for restriction_is_or_clause
Previous Message Japin Li 2022-10-25 03:36:48 Outdated comments in AssignTransactionId?