Re: Emit a warning if the extension's GUC is set incorrectly

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Shinya Kato <Shinya11(dot)Kato(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Emit a warning if the extension's GUC is set incorrectly
Date: 2021-11-14 19:50:56
Message-ID: 681A95E0-0CCA-4C66-A12B-CE0D8D5076D7@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14 Nov 2021, at 11:03, Shinya Kato <Shinya11(dot)Kato(at)oss(dot)nttdata(dot)com> wrote:

> If wrong GUCs of auth_delay, pg_trgm, postgres_fdw and sepgsql are described in postgresql.conf, a warning is not emitted unlike pg_stat_statements, auto_explain and pg_prewarm.
> So, I improved it by adding EmitWarningsOnPlaceholders.
> An example output is shown below.
> ---
> 2021-11-14 18:18:16.486 JST [487067] WARNING: unrecognized configuration parameter "auth_delay.xxx"
> ---
>
> What do you think?

Seems reasonable on a quick skim, commit da2c1b8a2 did a similar roundup back
in 2009 but at the time most of these didn't exist (pg_trgm did but didn't have
custom option back then). There is one additional callsite defining custom
variables in src/pl/tcl/pltcl.c which probably should get this treatment as
well, it would align it with the pl/perl counterpart.

I'll have a closer look and test tomorrow.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Spirin 2021-11-14 19:53:01 Re: Atomic rename feature for Windows.
Previous Message Tom Lane 2021-11-14 19:26:33 Re: Commitfest 2021-11 Patch Triage - Part 2