pgschema icon indicating copy to clipboard operation
pgschema copied to clipboard

Global plans must not revoke the applying role's authority before dependent steps

Open Goldziher opened this issue 1 month ago • 1 comments

Parent: #627

A global desired-state plan can alter or revoke membership from the applying role before later ownership/default-privilege work that requires that authority.

The failure is version-independent and reproduced at planner level: the plan orders a self-membership revoke or privilege-reducing self-alteration before a dependent ownership transfer. The later step then lacks the authority that preflight observed.

Required behavior: reject contradictory self-demotion plans or schedule privilege-reducing changes to the applying role after every dependent operation. Preflight must evaluate authority in execution order, and the regression must prove the whole plan applies and replans to zero steps.

Goldziher avatar Oct 09 '26 09:10 Goldziher

Tracked under #627. A proposed implementation is in #637, which is still under discussion. Closing this sub-issue since it is covered by the #627 umbrella.

tianzhou avatar Oct 15 '26 03:10 tianzhou