Re: [Util] Warn and Remove Invalid GUCs - Mailing list pgsql-hackers

From Shaik Mohammad Mujeeb
Subject Re: [Util] Warn and Remove Invalid GUCs
Date
Msg-id 196f8a9f567.49e4346f26918.7859020675051383970@zohocorp.com
Whole thread Raw
Responses Re: [Util] Warn and Remove Invalid GUCs
Re: [Util] Warn and Remove Invalid GUCs
Re: [Util] Warn and Remove Invalid GUCs
List pgsql-hackers
Hi David J,

> Because any such setting name is perfectly valid (it serves as a placeholder) and whether it is a typo or just some valid unregistered prefix is not something the system can know.

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.


Thoughts on this approach?


 
Thanks & Regards,
Shaik Mohammad Mujeeb
Member Technical Staff
Zoho Corp







---- On Thu, 22 May 2025 02:01:25 +0530 David G. Johnston <david.g.johnston@gmail.com> wrote ---

On Wednesday, May 21, 2025, Shaik Mohammad Mujeeb <mujeeb.sk@zohocorp.com> wrote:

Currently, if there's a typo in an extension name while adding a GUC to postgresql.conf, PostgreSQL server starts up silently without any warning.


Because any such setting name is perfectly valid (it serves as a placeholder) and whether it is a typo or just some valid unregistered prefix is not something the system can know.

David J.




pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: Re: [PATCH] Add pretty-printed XML output option
Next
From: Srinath Reddy Sadipiralla
Date:
Subject: Re: [Util] Warn and Remove Invalid GUCs