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: mert@futo.org, pgsql-bugs@lists.postgresql.org
Date: 2025-06-25T16:06:05Z
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 →
-
Allow resetting unknown custom GUCs with reserved prefixes.
- f79ca73d75cb 15.14 landed
- b998ce3272ab 16.10 landed
- 9eb6068fb64c 19 (unreleased) landed
- 7b9674a8b180 18.0 landed
- 39ff056365e4 17.6 landed
-
Allow ALTER SYSTEM to set unrecognized custom GUCs.
- 2d870b4aeff1 17.0 cited
-
Disallow setting bogus GUCs within an extension's reserved namespace.
- 88103567cb8f 15.0 cited
Attachments
Here is a tidied-up version of the patch. It's still quite fragile, but AFAICT to do any better we'd need to return more context from find_option(), and I don't think we can change that one on the back-branches since it's exported. I assume we don't want find_option() to create a placeholder in this case, either. I'll continue to look around for a better solution... If we wanted to open up RESET in this case to everyone with suitable privileges on the target DB and/or role (as proposed by Tom upthread [0]), I think we'd just need to replace the "return false;" under find_option() to "return reset_custom;". [0] https://postgr.es/m/2474668.1750451081%40sss.pgh.pa.us -- nathan