Postgres Roles orphaned after update to Postgres v16

Johannes Nodop 20 Reputation points
2025-06-19T12:38:39.06+00:00

With out Postgres Flexible Server updated to v16 we have some orphaned roles that can no longer be removed or assigned due to missing admin priviliges.
According to all documentation and research only the superuser can do this but this role is only hold by "azure".

As example, some of our roles (when viewed in pgAdmin) do not have any member with "with Admin" permission.

How to proceed? We do not want to setup a new database and migrate all the data.
We hope someone from the technical support team could help us.

In the end the problem is very similar to this one that got (probably) solved in a private conversation: https://learn.microsoft.com/en-us/answers/questions/2259237/bug-orphaned-roles-cannot-be-dropped-on-azure-db-f

Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. Mahesh Kurva 5,025 Reputation points Microsoft External Staff Moderator
    2025-06-23T14:19:43.5033333+00:00

    Hi Johannes Nodop,

    The initial issue occurred after the Postgres Flexible Server was updated to v16, which resulted in orphaned roles that could not be removed or assigned due to missing admin privileges.

    The issue was resolved by the backend team by ensuring that the user performing the role modifications has the necessary privileges, specifically the ADMIN OPTION on the roles being modified.

    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    If this answers your query, do click Accept Answer and Upvote for was this answer helpful. User's image

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.