- Notifications
You must be signed in to change notification settings - Fork5.2k
Commitb998ce3
committed
Allow resetting unknown custom GUCs with reserved prefixes.
Currently, ALTER DATABASE/ROLE/SYSTEM RESET [ALL] with an unknowncustom GUC with a prefix reserved by MarkGUCPrefixReserved() errors(unless a superuser runs a RESET ALL variant). This is problematicfor cases such as an extension library upgrade that removes a GUC.To fix, simply make sure the relevant code paths explicitly allowit. Note that we require superuser or privileges on the parameterto reset it. This is perhaps a bit more restrictive than isnecessary, but it's not clear whether further relaxing therequirements is safe.Oversight in commit8810356. The ALTER SYSTEM fix is dependenton commit2d870b4, which first appeared in v17. Unfortunately,back-patching that commit would introduce ABI breakage, and whilethat breakage seems unlikely to bother anyone, it doesn't seemworth the risk. Hence, the ALTER SYSTEM part of this commit isomitted on v15 and v16.Reported-by: Mert Alev <mert@futo.org>Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>Discussion:https://postgr.es/m/18964-ba09dea8c98fccd6%40postgresql.orgBackpatch-through: 151 parentadfd802 commitb998ce3
File tree
5 files changed
+54
-4
lines changed- contrib/auto_explain
- expected
- sql
- src/backend/utils/misc
5 files changed
+54
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6561 | 6561 | | |
6562 | 6562 | | |
6563 | 6563 | | |
| 6564 | + | |
6564 | 6565 | | |
6565 | 6566 | | |
6566 | 6567 | | |
| |||
6579 | 6580 | | |
6580 | 6581 | | |
6581 | 6582 | | |
6582 | | - | |
| 6583 | + | |
| 6584 | + | |
| 6585 | + | |
| 6586 | + | |
| 6587 | + | |
6583 | 6588 | | |
6584 | | - | |
6585 | | - | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
6586 | 6592 | | |
6587 | 6593 | | |
6588 | 6594 | | |
6589 | 6595 | | |
6590 | 6596 | | |
6591 | | - | |
| 6597 | + | |
6592 | 6598 | | |
6593 | 6599 | | |
6594 | 6600 | | |
| |||
0 commit comments
Comments
(0)