pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
To: pgsql-hackers@postgresql.org
Subject: Emit a warning if the extension's GUC is set incorrectly
Date: Sun, 14 Nov 2021 19:03:59 +0900
Message-ID: <524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com> (raw)

Hi hackers,

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?

-- 
Regards,

--
Shinya Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

v1_Add_EmitWarningsOnPlaceholders.patch (text/x-diff, 1.4K) download diff --git a/contrib/auth_delay/auth_delay.c b/contrib/auth_delay/auth_delay.c index 5820ac328d..d11dd1e416 100644 --- a/contrib/auth_delay/auth_delay.c +++ b/contrib/auth_delay/auth_delay.c @@ -67,6 +67,9 @@ _PG_init(void) NULL, NULL, NULL); + + EmitWarningsOnPlaceholders("auth_delay"); + /* Install Hooks */ original_client_auth_hook = ClientAuthentication_hook; ClientAuthentication_hook = auth_delay_checks; diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c index fb38135f7a..0407c7dd64 100644 --- a/contrib/pg_trgm/trgm_op.c +++ b/contrib/pg_trgm/trgm_op.c @@ -100,6 +100,8 @@ _PG_init(void) NULL, NULL, NULL); + + EmitWarningsOnPlaceholders("pg_trgm"); } /* diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c index 48c7417e6e..36555398ec 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -469,4 +469,6 @@ _PG_init(void) NULL, NULL, NULL); + + EmitWarningsOnPlaceholders("postgres_fdw"); } diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c index 19a3ffb7ff..44a09c35a7 100644 --- a/contrib/sepgsql/hooks.c +++ b/contrib/sepgsql/hooks.c @@ -455,6 +455,8 @@ _PG_init(void) NULL, NULL); + EmitWarningsOnPlaceholders("sepgsql"); + /* Initialize userspace access vector cache */ sepgsql_avc_init();

view thread (24+ messages)  latest in thread

Message-ID: <524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com>
Permalink:  ../524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com/
Also on:    postgresql.org/message-id/524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Shinya11.Kato@oss.nttdata.com
  Subject: Re: Emit a warning if the extension's GUC is set incorrectly
  In-Reply-To: <524fa2c0a34f34b68fbfa90d0760d515@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox