Citus
Profile
Citus is an open-source PostgreSQL extension that transforms single-node PostgreSQL into a horizontally scalable distributed database system. Maintained by Microsoft following its acquisition of Citus Data, the extension enables organizations to scale PostgreSQL across multiple nodes while preserving full SQL compatibility, ACID guarantees, and the entire PostgreSQL ecosystem. Operating as an extension rather than a fork, Citus allows applications to use standard PostgreSQL drivers and tools without modification. The project is fully open-source under the GNU Affero General Public License v3.0, with all previously enterprise-only features released to the community. Citus powers production systems handling billions of daily transactions across multi-tenant SaaS platforms, real-time analytics dashboards, and time-series workloads.
Focus
Citus addresses PostgreSQL's fundamental single-node scalability constraint, enabling horizontal scaling without abandoning PostgreSQL's mature feature set. The extension solves performance bottlenecks in multi-tenant SaaS applications requiring tenant isolation and performance guarantees, real-time analytics systems serving sub-second queries to thousands of concurrent users, and time-series platforms handling high-velocity data ingest with efficient archival. Platform engineers benefit from preserving existing PostgreSQL expertise, tooling, and application code while gaining distributed database capabilities. The architecture supports progressive scaling—organizations start with single-node deployments and add worker nodes as demand grows, without application modifications. Citus maintains PostgreSQL's transactional semantics, advanced SQL features, and extension compatibility while distributing data and queries across commodity hardware.
Background
Citus Data was founded to create a distributed PostgreSQL solution, developing Citus as an open-source extension with an initial business model based on enterprise licensing. Microsoft acquired Citus Data, integrating the technology into Azure's PostgreSQL offerings while maintaining the open-source project. The company subsequently open-sourced all remaining enterprise features, eliminating distinctions between community and commercial versions. The extension now operates under a fully open-source model with active development on GitHub, accepting community contributions while Microsoft provides organizational infrastructure. Production deployments demonstrate Citus's maturity, with organizations running multi-tenant applications serving thousands of customers and analytics platforms processing terabytes of data. The project maintains alignment with PostgreSQL's release cycle, supporting recent PostgreSQL versions.
Main features
Distributed table sharding with intelligent query routing
Citus partitions PostgreSQL tables into shards distributed across worker nodes based on a chosen distribution column, typically a tenant ID or entity identifier. The system uses hash-based partitioning to ensure rows with identical distribution column values remain co-located on the same physical node, enabling efficient joins and transactions within logical groupings. The distributed query engine analyzes incoming SQL and either routes queries to a single worker node when filtering on the distribution column or parallelizes execution across multiple shards for aggregations spanning distribution keys. This architecture enables linear scalability—adding worker nodes proportionally improves query performance. Organizations can specify shard counts independently of node counts, allowing future rebalancing as clusters grow.
Reference tables for replicated dimension data
Citus provides reference tables that maintain identical copies of small lookup tables across all worker nodes, eliminating network data redistribution during joins between distributed fact tables and dimension tables. This feature proves essential for star schema analytics where dimension tables must be accessible by queries targeting any shard. Reference tables support configuration data, master data, and lookup tables that require global visibility. The system automatically propagates DDL operations and data modifications to all replicas, maintaining consistency across the cluster. This approach enables efficient local joins on each worker node, significantly improving query performance for analytical workloads that combine large distributed tables with smaller reference data.
Columnar storage with compression for analytical workloads
Citus implements columnar storage as an optional table access method, organizing data by column rather than row to optimize analytical queries that access specific metrics across many rows. The columnar format achieves compression ratios exceeding traditional row-oriented storage by factors of three to ten, reducing both storage costs and query latencies by keeping more data in memory. This capability combines with distributed table sharding and time-based partitioning to create efficient analytics databases within PostgreSQL. Columnar storage particularly benefits time-series and real-time analytics workloads where queries typically aggregate specific columns. The feature integrates seamlessly with PostgreSQL's declarative partitioning, enabling hierarchical data structures that efficiently manage data lifecycle and retention policies.





