Azure Cosmos DB for PostgreSQL

deprecated

by Microsoft · since 2019 · also known as Hyperscale (Citus), Azure Database for PostgreSQL Hyperscale (Citus)

Microsoft's managed Citus service for sharded Postgres, now retiring in favor of Elastic Clusters.

relationaldocumentcolumnar / olapspatialmanaged serviceproprietarylegacy

deprecated. Microsoft lists it as on a retirement path and not recommended for new projects; use Elastic Clusters in Azure Database for PostgreSQL instead.

Overview

Azure Cosmos DB for PostgreSQL is Microsoft's managed service for Citus, the extension that shards PostgreSQL tables across a coordinator and worker nodes. It began as Hyperscale (Citus) under Azure Database for PostgreSQL and was rebranded under the Cosmos DB umbrella in 2022, despite having nothing in common with Cosmos DB's NoSQL engine. It suited multi-tenant SaaS and real-time analytics that outgrew one Postgres server. Microsoft has since put the service on a retirement path: it is no longer recommended for new projects, and Postgres users are directed to Elastic Clusters in Azure Database for PostgreSQL, which provide the same Citus sharding inside the mainstream Postgres service.

Strengths & trade-offs

Strengths

  • +Fully managed Citus with built-in PgBouncer, HA and backups
  • +Start on one node and distribute tables later without changing databases
  • +Tracks new PostgreSQL majors quickly because Citus is an extension

Trade-offs

  • −On a retirement path; no future for new projects
  • −Confusing branding: unrelated to Cosmos DB's NoSQL APIs
  • −Cross-shard queries on non-distribution columns can be slow

Great for

  • +Existing deployments planning migration to Elastic Clusters
  • +Multi-tenant SaaS sharded by tenant (legacy)
  • +Real-time analytics dashboards (legacy)

Think twice for

  • −Any new project
  • −Workloads needing multi-region writes

Capabilities

Native or official first-party support · 16 of 25 tracked

✓Transactions
✓Joins
✓Secondary indexes
✓Full-text search
✓Vector search
✓Geospatial
✓JSON
✓Triggers
✓Stored procedures
✓Materialized views
✓Columnar storage
✓Durable persistence
✓Compression
✓Encryption at rest
✓Role-based access
✓Online schema changes
–Change data capture
–TTL / expiry
–Pub/Sub
–In-memory
–Time travel
–Branching
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Large · ≤ 1 PB
Horizontal scaling
Native
Multi-region
Read replicas
Transactions
Full ACID
Consistency
Strong
Schema
Strict
Architecture
Distributed, Client server
Query languages
SQL, PL/pgSQL

Distributed tables across worker nodes with shard rebalancing; HA standbys and cross-region read replicas.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

available on · Azure

Ecosystem

compatible withPostgreSQL
apis & protocolsPostgreSQL wire protocol
client languagesC#, Java, Python, JavaScript, Go, Ruby, PHP

Alternatives to Azure Cosmos DB for PostgreSQL

Compare all→
Azure Database for PostgreSQLRelational4.9

Microsoft's managed community PostgreSQL, with zone-redundant HA, DiskANN vectors and Citus elastic clusters.

azure-cosmos-db-for-postgresql vs azure-database-for-postgresql →
CitusRelational21.1

Postgres extension that shards tables across nodes for multi-tenant SaaS and real-time analytics.

azure-cosmos-db-for-postgresql vs citus →
Azure Cosmos DBDocument45.3

Microsoft's globally distributed, multi-API NoSQL and vector database with SLA-backed latency.

azure-cosmos-db-for-postgresql vs azure-cosmos-db →
YugabyteDBRelational32.7

Apache-licensed distributed SQL that reuses the PostgreSQL query layer on a Raft-replicated storage engine.

azure-cosmos-db-for-postgresql vs yugabytedb →
CockroachDBRelational47.1

Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions.

azure-cosmos-db-for-postgresql vs cockroachdb →
PolarDB-XRelational5.0

Alibaba's open-source, MySQL-compatible shared-nothing distributed SQL with Paxos and columnar indexes.

azure-cosmos-db-for-postgresql vs polardb-x →

Azure Cosmos DB for PostgreSQL FAQ

What is Azure Cosmos DB for PostgreSQL?

Azure Cosmos DB for PostgreSQL is a relational database by Microsoft, first released in 2019. Azure Cosmos DB for PostgreSQL is Microsoft's managed service for Citus, the extension that shards PostgreSQL tables across a coordinator and worker nodes. It began as Hyperscale (Citus) under Azure Database for PostgreSQL and was rebranded under the Cosmos DB umbrella in 2022, despite having nothing in common with Cosmos DB's NoSQL engine. It suited multi-tenant SaaS and real-time analytics that outgrew one Postgres server. Microsoft has since put the service on a retirement path: it is no longer recommended for new projects, and Postgres users are directed to Elastic Clusters in Azure Database for PostgreSQL, which provide the same Citus sharding inside the mainstream Postgres service.

Is Azure Cosmos DB for PostgreSQL open source?

No. Azure Cosmos DB for PostgreSQL is proprietary, closed-source software.

Does Azure Cosmos DB for PostgreSQL support ACID transactions?

Yes. Azure Cosmos DB for PostgreSQL supports full ACID transactions, with strong consistency.

Does Azure Cosmos DB for PostgreSQL scale horizontally?

Azure Cosmos DB for PostgreSQL scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB). It supports cross-region read replicas.

How can I run Azure Cosmos DB for PostgreSQL?

You can use the vendor's managed cloud. It is available on Azure.

What is Azure Cosmos DB for PostgreSQL best for?

Azure Cosmos DB for PostgreSQL is a strong fit for existing deployments planning migration to Elastic Clusters, multi-tenant SaaS sharded by tenant (legacy) and real-time analytics dashboards (legacy). Think twice for any new project.

What are the best alternatives to Azure Cosmos DB for PostgreSQL?

Common alternatives to Azure Cosmos DB for PostgreSQL include Azure Database for PostgreSQL, Citus, Azure Cosmos DB, YugabyteDB and CockroachDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is Azure Cosmos DB for PostgreSQL still maintained?

Azure Cosmos DB for PostgreSQL is deprecated. Microsoft lists it as on a retirement path and not recommended for new projects; use Elastic Clusters in Azure Database for PostgreSQL instead.

How popular is Azure Cosmos DB for PostgreSQL?

Azure Cosmos DB for PostgreSQL has little measurable public adoption today, so it ranks near the bottom of the WhichDB Score.