Re: [Util] Warn and Remove Invalid GUCs

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Shaik Mohammad Mujeeb <mujeeb(dot)sk(at)zohocorp(dot)com>
Cc: davidgjohnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, mujeebskdev <mujeeb(dot)sk(dot)dev(at)gmail(dot)com>
Subject: Re: [Util] Warn and Remove Invalid GUCs
Date: 2025-05-22 16:52:41
Message-ID: CA+TgmoYjvD3m-yYGONvemYyAszexMAXBL6W53wrw7gnsR4ouMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 22, 2025 at 12:10 PM Shaik Mohammad Mujeeb
<mujeeb(dot)sk(at)zohocorp(dot)com> wrote:
> In my patch, I currently warn and remove invalid GUCs from the hashtable. However, as you rightly pointed out, some of these could belong to valid but unregistered prefixes. In such cases, it might not be ideal to remove them outright. Instead, it could be more helpful to simply warn the user - covering both potential typos and GUCs with valid yet unregistered prefixes.
>
> I do understand that not everyone may prefer seeing such warnings during PG server restart. To address this, we could introduce a new GUC (perhaps named warn_on_unregistered_guc_prefix), which defaults to false, preserving the existing behaviour. If explicitly enabled, it would emit warnings for these cases, giving users the choice to opt in to this feedback.

I think you might be missing the point of the comments from Tom and
David. To the extent that it is possible to give warnings, we already
do. So this proposal just doesn't really make sense. It either warns
in cases where there is no actual problem, or it gives a duplicate
warning in cases where there is. Changing the details of the proposal
doesn't address that fundamental problem.

I would really encourage you to spend a bit more time trying to
understand the current design intention and behavior before proposing
changes. It actually makes a lot of sense. It is not perfect, but if
there were a simple way to do better we would have likely done that a
long time ago.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-05-22 16:54:14 Re: Minor adjustment to pg_aios output naming
Previous Message Tom Lane 2025-05-22 16:51:58 Re: [Util] Warn and Remove Invalid GUCs