Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pryzby(at)telsasoft(dot)com, nitinjadhavpostgres(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl
Date: 2023-02-13 02:27:58
Message-ID: 20230213.112758.732091838102827587.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 10 Feb 2023 16:43:15 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Wed, Feb 08, 2023 at 09:42:13PM -0500, Tom Lane wrote:
> > Hm. On the one hand, if it is in fact not in postgresql.conf.sample,
> > then that flag should be set for sure. OTOH I see that that flag
> > isn't purely documentation: help_config.c thinks it should hide
> > GUCs that are marked that way. Do we really want that behavior?
> > Not sure. I can see an argument that you might want --describe-config
> > to tell you that, but there are a lot of other GUC_NOT_IN_SAMPLE
> > GUCs that maybe do indeed deserve to be left out.
>
> I am not sure to follow. help_config() won't show something that's
> either marked NO_SHOW_ALL, NOT_IN_SAMPLE or DISALLOW_IN_FILE, hence
> config_file does not show up already in what postgres
> --describe-config prints, because it has DISALLOW_IN_FILE, so adding
> NOT_IN_SAMPLE changes nothing.

I think currently the output by --describe-config can be used only for
consulting while editing a (possiblly broken) config file. Thus I
think it's no use showing GIC_DISALLOW_IN_FILE items there unless we
use help_config() for an on-session use.

On the other hand, don't we need to remove the condition
GUC_NOT_IN_SAMPLE from displayStruct? I think that help_config()
should show a value if it is marked as !GUC_DISALLOW_IN_FILE even if
it is GUC_NOT_IN_SAMPLE. I'm not sure whether there's any variable
that are marked that way, though.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-02-13 02:52:34 Re: Rework LogicalOutputPluginWriterUpdateProgress
Previous Message Kyotaro Horiguchi 2023-02-13 01:56:51 Re: Exit walsender before confirming remote flush in logical replication