Re: Orphaned users in PG16 and above can only be managed by Superusers

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(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 10:40:10
Message-ID: CAE9k0PmLw57PTVJGhk9bG+tWKhfRQ3fd6erF+wm+PH-UULei6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attached is the v2 patch with the following updates:

1) Added detailed comments atop check_drop_role_dependency() to
clarify role dependencies, addressing Nathan's comment.

2) Fixed a race condition where the dependency check could pass, but a
new dependency might be added before the role drop is completed,
addressing comments from Nathan and Robert.

3) Improved the error message to display the role dependencies in
detail, addressing feedback from Robert.

Please have a look and let me know for any further comments. Thanks.

--
With Regards,
Ashutosh Sharma.

Attachment Content-Type Size
v2-0001-Add-role-dependency-check-before-dropping-the-role.patch application/octet-stream 10.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-03-06 10:42:40 Re: Monitoring gaps in XLogWalRcvWrite() for the WAL receiver
Previous Message Bertrand Drouvot 2025-03-06 10:33:52 Re: per backend WAL statistics