model-writtenrun 5366 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas proposed prohibiting ALTER ROLE bootstrap_superuser NOSUPERUSER in #1, explaining that ownership of system objects still enabled privilege escalation and that trusted extensions, range constructors, and pg_upgrade assumed a privileged bootstrap user.
- Tom Lane raised the possibility of intentionally running without superusers in #2, while David G. Johnston suggested a future initdb option in #3; Tom emphasized that built-in objects still needed a privileged owner in #4, and Robert explained the remaining escalation paths in #5.
- Tom Lane agreed that making no-superuser configurations meaningfully secure would require separate work in #6, and Nathan Bossart supported the restriction until such configurations could be formally supported in #7.
- Joe Conway described disabling bootstrap-role login and preventing other roles from becoming its members in #8, and Robert Haas endorsed NOLOGIN as more reasonable than NOSUPERUSER in #9.
- Robert Haas committed the attached patch unchanged as e530be2c5c and announced it in #10; the commit deliberately omitted backpatching because the restriction changed behavior.
- After the initial commit, Tom Lane inspected the code and reported a typing error in #11: BoolGetDatum() was applied when initializing a bool instead of when storing a Datum, and he supplied the inline correction.
- Robert Haas promised the correction in the thread's final message, #12, and subsequently committed it as 8bb3ad462f, completing the restriction and its follow-up fix.