Re: [Util] Warn and Remove Invalid GUCs

From: Shaik Mohammad Mujeeb <mujeeb(dot)sk(at)zohocorp(dot)com>
To: "davidgjohnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "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 15:43:30
Message-ID: 196f8a9f567.49e4346f26918.7859020675051383970@zohocorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)g(dot)johnston(at)gmail(dot)com> wrote ---

On Wednesday, May 21, 2025, Shaik Mohammad Mujeeb <mailto:mujeeb(dot)sk(at)zohocorp(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Srinath Reddy Sadipiralla 2025-05-22 15:52:35 Re: [Util] Warn and Remove Invalid GUCs
Previous Message Jim Jones 2025-05-22 15:34:42 Re: [PATCH] Add pretty-printed XML output option