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

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-31 06:21:48
Message-ID: CAHut+PuG6CuTJRULyWURbDOZapukHAfqnbLd29nKiGDgGcY-Zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 31, 2022 at 4:02 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Mon, Oct 31, 2022 at 12:01:33PM +1100, Peter Smith wrote:
> > SUGGESTION
> > /* Only applicable when prefetching is available */
>
> Thanks for the suggestion. Done this way, then.
>
> > +/* Disabled on Windows as the performance overhead can be significant */
> > +#ifdef WIN32
> > +#define DEFAULT_UPDATE_PROCESS_TITLE false
> > +#else
> > +#define DEFAULT_UPDATE_PROCESS_TITLE true
> > +#endif
> > extern PGDLLIMPORT bool update_process_title;
> >
> > Perhaps put that comment inside the #ifdef WIN32
>
> I'd keep that externally, as ps_status.h does so.
>
> > [...]
> > SUGGESTION
> > /* Check the GUC default and declared initial value for consistency */
>
> Okay, fine by me.
>
> I have split the change into two parts at the end: one to refactor and
> fix the C declarations, and a second to introduce the check routine
> with all the correct declarations in place.
>
> FWIW, I have been testing that with my own in-house modules and it has
> caught a few stupid inconsistencies. Let's see how it goes.

Thanks for pushing.

------
Kind Regards,
Peter Smith.
Fujitsu Australia.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-10-31 07:14:16 Re: Adding doubly linked list type which stores the number of items in the list
Previous Message Bharath Rupireddy 2022-10-31 06:20:27 Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?