An Azure managed PostgreSQL database service for app development and deployment.
Hello @GustavoHiga-5354
First, confirm the Azure resource type. A Citus cluster managed through az cosmosdb postgres cluster normally uses Microsoft.DBforPostgreSQL/serverGroupsv2, which is Azure Cosmos DB for PostgreSQL, not a standard Azure Database for PostgreSQL flexible server. The two services use different replication and management APIs.
A promoted read replica becomes an independent read/write cluster and that promotion is irreversible. Deleting replicas through the replica resource or the primary cluster’s Replicate data globally pane.
Since:
- The portal, Azure CLI, and REST API show no replica resources.
- The source remains Ready and Primary.
- Deletion still reports two active replicas.
this points to service-side replication metadata that isn’t represented by currently visible ARM resources. SQL roles, Citus metadata tables, server restarts, and resource locks won’t provide a supported method to clear Azure control-plane replication metadata.
I cannot find a Microsoft-documented CLI, REST operation, or PostgreSQL command that allows customers to manually clear this replica count. Don’t attempt to modify Citus system metadata or delete underlying nodes independently.
This requires an Azure support case. Include:
- The complete source cluster resource ID.
- The former replica’s resource ID and region, if available.
- Promotion, switchover, and deletion timestamps in UTC.
- The failed delete operation ID and full error response.
- Output from az cosmosdb postgres cluster show.
- Confirmation that portal, CLI, and REST enumeration return no replicas.
Ask support to inspect and reconcile the Microsoft.DBforPostgreSQL/serverGroupsv2 geo-replication relationship metadata before retrying the cluster deletion.
Also note that Azure Cosmos DB for PostgreSQL is on a retirement path; Microsoft recommends Azure Database for PostgreSQL Elastic Clusters for new distributed PostgreSQL deployments.
References:
Create and manage read replicas
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.