pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Revert "Avoid race condition between "GRANT role" and "DROP ROLE 2+ messages / 1 participants [nested] [flat]
* pgsql: Revert "Avoid race condition between "GRANT role" and "DROP ROLE @ 2025-09-16 17:06 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2025-09-16 17:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Revert "Avoid race condition between "GRANT role" and "DROP ROLE"". This reverts commit 98fc31d6499163a0a781aa6f13582a07f09cd7c6. That change allowed DROP OWNED BY to drop grants of the target role to other roles, arguing that nobody would need those privileges anymore. But that's not so: if you're not superuser, you still need admin privilege on the target role so you can drop it. It's not clear whether or how the dependency-based approach to solving the original problem can be adapted to keep these grants. Since v18 release is fast approaching, the sanest thing to do seems to be to revert this patch for now. The race-condition problem is low severity and not worth taking risks for. I didn't force a catversion bump in 98fc31d64, so I won't do so here either. Reported-by: Dipesh Dhameliya <dipeshdhameliya125@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CABgZEgczOFicCJoqtrH9gbYMe_BV3Hq8zzCBRcMgmU6LRsihUA@mail.gmail.com Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8abbbbae610cd62faad4f9ec18e7cfa908593796 Modified Files -------------- doc/src/sgml/ref/drop_owned.sgml | 2 +- src/backend/commands/user.c | 23 ++++++----------------- src/test/regress/expected/privileges.out | 30 ------------------------------ src/test/regress/sql/privileges.sql | 15 --------------- 4 files changed, 7 insertions(+), 63 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Revert "Avoid race condition between "GRANT role" and "DROP ROLE @ 2025-09-16 17:06 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2025-09-16 17:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Revert "Avoid race condition between "GRANT role" and "DROP ROLE"". This reverts commit 98fc31d6499163a0a781aa6f13582a07f09cd7c6. That change allowed DROP OWNED BY to drop grants of the target role to other roles, arguing that nobody would need those privileges anymore. But that's not so: if you're not superuser, you still need admin privilege on the target role so you can drop it. It's not clear whether or how the dependency-based approach to solving the original problem can be adapted to keep these grants. Since v18 release is fast approaching, the sanest thing to do seems to be to revert this patch for now. The race-condition problem is low severity and not worth taking risks for. I didn't force a catversion bump in 98fc31d64, so I won't do so here either. Reported-by: Dipesh Dhameliya <dipeshdhameliya125@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CABgZEgczOFicCJoqtrH9gbYMe_BV3Hq8zzCBRcMgmU6LRsihUA@mail.gmail.com Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cc7053a5fe08883801057faa70101dcf99f0d071 Modified Files -------------- doc/src/sgml/ref/drop_owned.sgml | 2 +- src/backend/commands/user.c | 23 ++++++----------------- src/test/regress/expected/privileges.out | 30 ------------------------------ src/test/regress/sql/privileges.sql | 15 --------------- 4 files changed, 7 insertions(+), 63 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-09-16 17:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-09-16 17:06 pgsql: Revert "Avoid race condition between "GRANT role" and "DROP ROLE Tom Lane <tgl@sss.pgh.pa.us> 2025-09-16 17:06 pgsql: Revert "Avoid race condition between "GRANT role" and "DROP ROLE Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox