Distributed SQL has earned its place in the enterprise. When a PostgreSQL workload outgrows a single server, Citus lets it scale out across nodes while keeping the SQL, joins, transactions and extensions that engineering teams already know. Microsoft has offered that capability as Azure Cosmos DB for PostgreSQL, formerly Hyperscale (Citus).
Azure Cosmos DB for PostgreSQL (formerly Hyperscale Citus) brings distributed SQL to the PostgreSQL ecosystem. Built on the open-source Citus extension, it transparently shards tables across multiple nodes, enabling PostgreSQL to handle multi-terabyte datasets and hundreds of thousands of transactions per second. Unlike NoSQL distributed databases, it retains full PostgreSQL compatibility — SQL joins, foreign keys, ACID transactions, stored procedures, and the rich ecosystem of PostgreSQL extensions.
What has changed
- Retirement date: Microsoft announced in March 2026 that Azure Cosmos DB for PostgreSQL retires on 31 March 2029.
- No new deployments: Existing clusters, including read replicas, remain supported until then, but new clusters can no longer be created.
- The successor: Azure Database for PostgreSQL Elastic Clusters, also built on Citus, is Microsoft’s recommended destination.
- A migration tool: The Azure portal offers a guided migration with a dry run, designed for a short maintenance window.
In our experience, three years sounds generous until you count change freezes, vendor dependencies and testing cycles.
Why architecture still matters
Citus shards data across worker nodes and routes each query to where the data lives, so a workload can grow by adding nodes rather than buying a larger server. Elastic Clusters offer two ways to shard, and choosing well is the most consequential design decision:
| Sharding model | Best fit | Trade-off |
| Row-based | Large multi-tenant, IoT and high-throughput workloads | Needs a distribution column in every table and key |
| Schema-based | Microservices and ISV apps that cannot change their queries | Fewer tenants per node, no parallel cross-tenant queries |
Architecture: Cosmos DB for PostgreSQL Cluster
Table Distribution Strategies
| Strategy | When to Use | Example |
| Distributed (Hash) | Large tables (>100GB), high throughput | orders, events, logs |
| Reference | Small lookup tables joined with distributed | countries, categories, config |
| Local | Tables used only on coordinator | migrations, settings |
High-Level Use Cases
Use Case 1: Multi-Tenant SaaS Platform
A B2B SaaS company with 10,000 tenants distributes data by tenant_id. Each query is routed to the specific shard containing that tenant’s data, achieving single-digit millisecond latency. New tenants are added without downtime via online shard rebalancing.
Key Benefits:
- Tenant isolation at the database level — noisy neighbors eliminated
- Linear scaling by adding worker nodes
- Standard PostgreSQL — no application code changes
- Online rebalancing when adding capacity
Use Case 2: Real-Time Analytics on IoT Time-Series
A smart building company stores billions of sensor readings distributed by device_id. Columnar storage (Citus columnar) achieves 10x compression. Analytical queries (hourly averages, anomaly detection) run across all shards in parallel with sub-second response times.
Key Benefits:
- 10x storage compression with columnar format
- Parallel query execution across all worker nodes
- PostgreSQL ecosystem: pgvector for embeddings, PostGIS for spatial
- Built-in time-series partitioning with automated retention
Best Practices & Recommendations
- Choose distribution column carefully — it should be in most WHERE and JOIN clauses (typically tenant_id or entity_id)
- Use reference tables for small lookup data to enable local joins on every worker
- Enable connection pooling (PgBouncer built-in) for applications with many short connections
- Use columnar storage for append-only analytical tables — up to 10x compression
- Monitor shard balance using citus_shards view and rebalance proactively
- Use zone-redundant HA for production clusters to survive datacenter failures
Conclusion
The retirement of Azure Cosmos DB for PostgreSQL is a transition, not a setback. The idea behind it, scaling PostgreSQL horizontally without leaving PostgreSQL, continues in Elastic Clusters. What decides the outcome is the quality of assessment, rehearsal and ownership around the move digi edZe brings the architects, the phased method and the cross-cloud experience to deliver it.