model-writtenrun 5379 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart reported that a non-superuser could set a privileged placeholder GUC and have it accepted when a trusted extension loaded under the bootstrap superuser, identifying a regression affecting PostgreSQL 15 and later #1.
- Tom Lane proposed recording the role that originally assigned each GUC value and using it for subsequent permission checks, while identifying the resulting structure and function compatibility concerns #3; Nathan withdrew his alternative involving temporary role switching and favored fixing the feature over reverting it #4 #5.
- Joe Conway accepted recompilation and API changes during beta, Michael Paquier supported making the necessary compatibility changes, and John Naylor confirmed that the release management team accepted an ABI break #7 #8 #9.
- Tom’s patch preserved the existing set_config_option() API through a wrapper around set_config_option_ext(), propagated the original role through saved and serialized GUC state, and added a PL/Perl regression test; he also identified a separate omission in validate_option_array_item() #11.
- Nathan initially found Tom’s patch reasonable, then demonstrated that granted SET privileges allowed ALTER ROLE SET and individual RESET operations while RESET ALL incorrectly retained the setting, confirming Tom’s concern about duplicated permission checks #12 #13 #14.
- Nathan supplied an independent permission-check fix and suggested replacing the duplicated checks with a non-error-throwing set_config_option() call #15; Tom retained the separate checks because the function did not distinguish permission failures and a more specific privilege might eventually be appropriate #16.
- Tom committed both fixes together in 13d8388151, retaining #11 unchanged while refining the checks from #15, updating comments, and adding ALTER ROLE SET/RESET regression tests, with a backport to PostgreSQL 15.
- After the commit, Nathan agreed with retaining the manual checks because placeholders still required them #17; both posted fixes had landed, while the possible future use of a more specific privilege remained a design consideration.