Re: BUG #18964: `ALTER DATABASE ... RESET ...` fails to reset extension parameters that no longer exist

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, mert@futo.org, pgsql-bugs@lists.postgresql.org
Date: 2025-07-30T19:13:16Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow resetting unknown custom GUCs with reserved prefixes.

  2. Allow ALTER SYSTEM to set unrecognized custom GUCs.

  3. Disallow setting bogus GUCs within an extension's reserved namespace.

Attachments

On Mon, Jul 28, 2025 at 05:27:50PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> I looked into how easily this back-patched to v15 (where commit 88103567c
>> was added), and I noticed that the ALTER SYSTEM code looks a bit different
>> on v15 and v16.  Furthermore, I didn't see a simple way to fix it on those
>> versions without first back-patching commit 2d870b4.  From the commit
>> message, it looks like Tom didn't back-patch it at the time due to a lack
>> of complaints.  I'm currently thinking we should first back-patch that one
>> to at least v15, if not all supported versions, before applying my proposed
>> patch.  Thoughts?
> 
> No objection here.  Now that that's a couple years old, it should have
> had enough time to bake.

It applies relatively cleanly down to v15.  The only thing I had to change
was to replace guc_free() with free() on v15.  I was a little worried about
changing the signature of check_GUC_name_for_parameter_acl(), but
codesearch.debian.net doesn't show any outside uses.

-- 
nathan