0Pricing
SQL Academy · Lesson

Citus and Distributed Postgres

Use Citus to turn Postgres into a distributed database, with co-located tables and reference tables.

What Is Citus?

Citus is a PostgreSQL extension that turns a cluster of PG servers into a distributed database. You SELECT/INSERT against the coordinator; Citus routes to the right worker shards transparently.

Architecture

Two roles:

  • Coordinator — receives queries, holds the cluster's metadata, routes/aggregates
  • Workers — hold shard data, execute the actual queries

All lessons in this course

  1. Sharding Strategies: Range, Hash, Directory
  2. Cross-Shard Queries: The Hard Problem
  3. Citus and Distributed Postgres
  4. When NOT to Shard
← Back to SQL Academy