PostgreSQL as a distributed computing platform
summary
Argues PostgreSQL can act as a distributed platform and shows a working prototype: a 4-node Citus cluster with producers writing to a distributed events table, consumers claiming leases per shard via a probabilistic algorithm, and consumption driven by logical decoding via replication slots using DB link RPC. Key tools: Citus, dblink, pg_cron, logical decoding functions; core logic is two PL/pgSQL routines (obtain_leases and pull_events) of about seven SQL statements each, total prototype ≈300 lines. System achieves scaled consumers (32 vs 16 leases) and transactional exactly‑once delivery.
AI-written summary · about
chapters (9)
- 0:00Start
- 0:50Small data architecture
- 7:12Distributed system in progress
- 13:49Sharding strategy
- 15:05Consumer leases
- 20:11Consumers
- 22:18Consuming events
- 25:59Consumer loop
- 26:40Failure handling
related talks
08mFoundations of Distributed PostgreSQL with Citus
31mKEYNOTE: The Distributed PostgreSQL Problem & How Citus Solves it
32m8 keys to the growth of Citus & Distributed PostgreSQL
44mDistributed Postgres with Citus
53mBreakout Session
55mBreakout Session
42mPostgreSQL Distributed: Architectures & Best practices
46mpg paxos Table Replication through Distributed Consensus
