An Azure managed PostgreSQL database service for app development and deployment.
After a switchover the roles swap, so the replica link can still be recorded on the other server even when the West Europe server's own replica list comes back empty. The docs are clear that replicas have to go before the primary can be deleted, so it's worth checking the link from the Sweden Central side first:
- Run
az postgres flexible-server replica list --resource-group <rg> --name <sweden-server>and also open that server's Replication page in the portal. Note which server shows as Primary and which as Replica. - If the Sweden Central cluster is still linked as a replica and it's the one you want to keep, promote it to a standalone server. That breaks the link without deleting any data. Wait for the operation to fully finish.
- Then run the delete on the West Europe cluster again.
- If both servers show no replication link and the delete still says 2 active replicas, the metadata is stuck on the service side. Open a support request and include the correlation ID from the failed delete in the Activity log, since only Microsoft can clear that.
Which server shows as Primary on the Replication page right now, West Europe or Sweden Central?
If this resolved your issue, please consider accepting it as the answer. If the delete keeps failing, let me know and I'll be happy to keep helping.
Reference: