Skip to main content
Cloud / Azure / Products / Azure Cosmos DB for PostgreSQL - Distributed PostgreSQL on Azure

Azure Cosmos DB for PostgreSQL - Distributed PostgreSQL on Azure

Azure Cosmos DB for PostgreSQL is a fully managed distributed PostgreSQL service (based on Citus) for horizontal scaling of relational database workloads.

Databases
Pricing Model vCore-based (Coordinator + Worker Nodes)
Availability Global, EU regions
Data Sovereignty EU regions available
Reliability 99.99% SLA

Azure Cosmos DB for PostgreSQL is Microsoft’s solution for horizontal scaling of relational databases on a PostgreSQL foundation. The service was previously known as “Azure Database for PostgreSQL – Hyperscale (Citus)” and was repositioned under the Cosmos DB brand in 2022. At its core, it is based on the open-source Citus extension that Microsoft acquired.

Citus Architecture: Distributed PostgreSQL

The foundation of Cosmos DB for PostgreSQL is the Citus extension for PostgreSQL. Citus adds a horizontal sharding model to PostgreSQL: data is distributed across multiple worker nodes based on a defined shard column. A coordinator node accepts queries, analyzes the query plan, and coordinates parallel execution across the worker nodes. From the application’s perspective, the coordinator looks like an ordinary PostgreSQL instance, ensuring compatibility with existing applications and tools. PostgreSQL extensions, stored procedures, and standard SQL syntax work unchanged as long as queries are formulated in a shard-aware manner.

This model enables horizontal scaling for workloads that would hit limits on a single PostgreSQL server: multi-tenant SaaS applications with millions of tenants, time-series databases with high write throughput, or analytics workloads on large data volumes. As a managed service, Microsoft handles patching, backups, high availability with automatic failover, and monitoring.

Use Cases: Multi-Tenant and Analytics

Two architecture patterns dominate the use of Cosmos DB for PostgreSQL. The first is multi-tenant SaaS architecture: the tenant ID serves as the shard column, so all data for a tenant resides on the same worker node. This enables efficient queries within a tenant and simple data isolation. The second pattern is time-series data and analytics: the distributed write throughput allows very high ingestion rates, and parallel aggregation queries across all worker nodes benefit from horizontal scaling. For standard OLTP workloads with predictable access patterns, Azure Database for PostgreSQL Flexible Server is the simpler and often sufficient alternative.

Typical Use Cases

Horizontal scaling of PostgreSQL databases
Multi-tenant SaaS applications
Time-series data and analytics on PostgreSQL
Geo-distributed databases

Frequently Asked Questions

What is the difference from Azure Database for PostgreSQL Flexible Server?

Azure Database for PostgreSQL Flexible Server is a managed single-node PostgreSQL service for standard workloads. Cosmos DB for PostgreSQL (Citus) is a distributed cluster with multiple worker nodes that scales horizontally. For most applications, Flexible Server is sufficient; Cosmos DB for PostgreSQL is suited for very large data volumes and high-load scenarios.

What is Citus and how does sharding work?

Citus is an open-source PostgreSQL extension that distributes data across multiple worker nodes. A table is split into shards based on a shard column. The coordinator node receives queries, identifies the relevant shards, and coordinates parallel execution across the worker nodes.

Is Cosmos DB for PostgreSQL fully PostgreSQL-compatible?

Largely yes. Since it is a PostgreSQL extension, standard SQL queries, transactions, and many PostgreSQL features work. Some operations (e.g., cross-shard JOINs without a shard column) require query adjustments.

Microsoft Solutions Partner

innFactory is a Microsoft Solutions Partner. We provide expert consulting, implementation, and managed services for Azure.

Microsoft Solutions Partner Microsoft Data & AI

Similar Products from Other Clouds

Other cloud providers offer comparable services in this category. As a multi-cloud partner, we help you choose the right solution.

28 comparable products found across other clouds.

Ready to start with Azure Cosmos DB for PostgreSQL - Distributed PostgreSQL on Azure?

Our certified Azure experts help you with architecture, integration, and optimization.

Schedule Consultation