An Azure service designed to help simplify, guide, and automate database migrations to Azure.
The behavior is consistent with the new role-based security model and upgrade rules for Azure Database for PostgreSQL Flexible Server, especially for servers upgrading from PostgreSQL 11.
For upgrades from PostgreSQL 11 to a higher version, the documented requirement is:
"If you're performing the upgrade from PG11 to a higher version, you must first configure your flexible server to use SCRAM authentication by enabling SCRAM and resetting all login-role passwords."[1]
However, restricted/system-managed roles such as azure_pg_admin and other internal roles cannot be altered by customers:
"the azure_pg_admin role is a system-managed, restricted role and cannot be modified by users. Attempts to alter it ... will result in an error like:
ERROR: permission denied to alter restricted role"[0]
This same pattern applies to other restricted roles: they are controlled by the platform and not changeable via SQL, CLI, or REST by customers. The error messages seen when trying to alter or drop replication match this behavior.
There is no documented mechanism in Azure CLI, REST API, or SQL for customers to:
- reset passwords,
- change attributes, or
- drop restricted roles.
In addition, PostgreSQL 16 introduces stricter role-based security and hierarchy rules, and Azure extends azure_pg_admin to manage nonrestricted roles and objects, not restricted/system roles:[0][3]
"members of the azure_pg_admin role can manage roles and access objects owned by any nonrestricted role"[0]
Because the upgrade requirement explicitly demands that all login-role passwords be reset for PG11→higher upgrades, and restricted roles cannot be altered by customers, this scenario falls outside what can be remediated from the customer side. The replication role with an MD5 password that cannot be changed is effectively a platform artifact.
The only viable path is to engage Microsoft support so that the backend team can remediate or adjust this restricted role (or the upgrade validation) on the service side. There is no supported self-service method in the available documentation to bypass or modify a restricted role to satisfy the SCRAM precheck.
References: