On Mon, 9 Nov 2026 at 15:30, Andrey Borodin <[email protected]> wrote: > > Hi Kirill, > > On November 2, 2026, Kirill Reshke wrote: > > So, can we use same in 2pc (prepared) tx? > > I agree that prepared transactions should follow the same inherited > ownership rules as other objects. has_privs_of_role() seems the right > check, including INHERIT TRUE, SET FALSE. > > In the roles discussion you linked, Tom explicitly suggested retaining > this check. I think it is worth revisiting that decision.
Sure. Maybe it was some sort of safety measure back then - but I don't get the exact vulnerability. > One implementation detail. LockGXact() currently checks ownership while > holding TwoPhaseStateLock. Membership expansion can read pg_auth_members > and acquire a relation lock on a cache miss. Could we reserve the GXACT, > release the LWLock, then check permission, using the existing abort > cleanup if permission is denied? > > Could you post the patch? > > Thank you! > > > Best regards, Andrey Borodin. > PFA -- Best regards, Kirill Reshke
v1-0001-Honor-inherited-ownership-when-finishing-prepared.patch
Description: Binary data
