model-writtenrun 5240 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas identified four operations permitted by non-inherited role membership and proposed requiring inherited privileges for ALTER DEFAULT PRIVILEGES, while initially leaving ownership creation, ownership transfer, and SET ROLE unchanged #1.
- Joe Conway supported correcting default privileges; Haas questioned back-patching because users could already SET ROLE, and Tom Lane opposed changing established behavior in minor releases #2 #3 #4.
- Haas posted the sole patch, replacing the membership check with has_privs_of_role and a permission-denied error; he omitted a replacement comment and regression tests, citing existing commentary and poorly organized privilege tests #5.
- A separate proposal to restrict SET ROLE prompted Haas to reconsider ownership creation and transfer, proposing that both require inherited privileges; Stephen Frost objected that this would prevent efficient ownership transfers and argued that predefined roles should generally not own user-created objects #6 #7.
- Haas explained how ownership transfer could bypass SET ROLE restrictions and offered checking either inherited privileges or SET ROLE permission; Wolfgang Walther first suggested a distinct ownership-target privilege, then favored requiring SET ROLE permission alone #8 #9 #10 #11 #12.
- Haas committed the unchanged default-privileges patch from #5 as 48a257d444, without back-patching, and reported consensus on the behavior despite receiving no patch-specific comments #13.
- The ownership debate continued after the commit: Haas acknowledged compatibility advantages of tying ownership transfer to SET ROLE, but worried about inherited access to objects owned by predefined roles and suggested such roles should remain minimally privileged #14.
- Walther challenged Haas's trigger-based escalation example, and Haas corrected it: a malicious trigger runs as whoever invokes it, so the danger depends on another user accessing the affected table rather than immediately acquiring its owner's identity #15 #16.
- Walther proposed withholding inherited ownership-related DDL rights when SET ROLE is forbidden, then revised that proposal to make ownership itself non-inheritable; Haas rejected the distinction as unclear and inconsistent with inheriting a role's privileges #17 #18 #19.
- Frost favored preventing SET ROLE and user-created object ownership specifically for predefined roles, highlighted similar hazards from views and row security, and joined Haas in rejecting a broad change to inherited ownership rights #20 #21.
- Haas narrowed the remaining decision to whether ownership creation and transfer should require membership, inheritance, either inheritance or SET ROLE permission, or SET ROLE permission alone; Walther clarified his broader proposal, but Haas still rejected it #22 #23 #24.
- The thread ended with Jeff Davis favoring general-purpose privilege-container roles that cannot own or create objects, receive SET ROLE, or issue grants; the default-privileges fix had landed, while ownership checks and privilege-container roles remained unresolved without another attached patch #25 #26.