From: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Orphaned users in PG16 and above can only be managed by Superusers |
Date: | 2025-03-06 05:03:26 |
Message-ID: | CAE9k0PmFK40LU-nKwGkvEWv5ANsZsH5CAVfQniBO_uzantP1vg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks, Nathan, for reviewing the patch. Below are my comments inline:
On Thu, Mar 6, 2025 at 1:43 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
>
> * The patch alleges to only block DROP ROLE commands when there exists
> _both_ admins of the target role and roles for which the target role is
> an admin. However, it's not clear to me why both need to be true. I
> might be able to glean the reason if I read this thread carefully or
> spend more time thinking about it, but IMHO that patch itself should make
> it obvious. I'd suggest expanding the comment atop
> check_drop_role_dependency().
>
I'll update the comments above the check_drop_role_dependency()
function to clarify things.
> * Does this introduce any race conditions? For example, is it possible for
> the new check to pass and then for a dependency to be added before the
> drop completes?
>
I believe it is; I may need to adjust the location from where I'm
calling check_drop_role_dependency() to take care of this. I'll
address this in the next patch version. Thanks for bringing up this
concern.
--
With Regards,
Ashutosh Sharma.
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Sharma | 2025-03-06 05:04:54 | Re: Orphaned users in PG16 and above can only be managed by Superusers |
Previous Message | Noah Misch | 2025-03-06 04:49:33 | Re: Refactoring postmaster's code to cleanup after child exit |