Postgres version upgrade: Broken user/role management after upgrade to v16

Alexander Harrington 20 Reputation points
2025-06-13T08:23:38.2233333+00:00

Hello, I am having issues with my Postgres instance (Azure Flexible Server for Postgres).

After the upgrade from V12 to V16 (more specifically, the issue stems from the upgrade to V16), we lost the ability to modify existing users and roles in our database - but we can still create new users and roles. We have received support on this issue before, but the issue has persisted / regressed.

When attempting to modify any existing user or role, we get the error message from Postgres:

ERROR: permission denied to grant role 'role_x' Detail: Only roles with the ADMIN option on role 'user_a' may grant this role.

The issue is reportedly known by Microsoft, as it was a bug introduced by their handling of the vX-to-v16 migration (confirmed by support personnel in first round of support, as well as in below link).

https://learn.microsoft.com/en-us/answers/questions/1835378/can-not-manage-roles-in-v16-that-where-created-in

We only have a developer support plan, and the generic MS support from admin.microsoft.com is not able to help, because it is too technical. However, given that the issue was introduced by MS itself, I expect adequate support regardless of our support plan.

Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. Mahesh Kurva 5,025 Reputation points Microsoft External Staff Moderator
    2025-06-20T11:16:06.35+00:00

    Hi Alexander Harrington,

    The issue you’re experiencing—receiving the Postgres error ERROR: permission denied to grant role 'role_x' after upgrading from V12 to V16—is related to changes in role and permission handling in the newer version.

    The issue was resolved by the backend team by ensuring the user performing the role/user 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


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.