pg paxos Table Replication through Distributed Consensus
summary
A Postgres extension called PG Paxos (pgos/PG paos) implements multi-Paxos-style table replication in ~1,000 lines of plpgsql using dblink, running on Postgres 9.3–9.6 and on GitHub. It builds a replicated log, guarantees serializable history, tolerates a minority failure with a three-node majority (writes require two-of-three), and supports distributed locks — demonstrated as an HA cron lock on AWS where two cron workers race and one tweet wins. Throughput is limited to roughly one write per roundtrip (optimistically ~1k/s with tuning).
AI-written summary · about
chapters (12)
- 0:00Intro
- 0:21Distributed consensus
- 4:49Paxos: Phase 1
- 9:06Paxos: Phase 2
- 19:22CREATE EXTENSION pg_paxos
- 19:48pg_paxos internals
- 20:57Table replication
- 21:33Cluster set-up
- 22:19Handling writes
- 22:48Handling reads
- 34:38Applications
- 36:23Why not Raft?
related talks
38mPostgreSQL as a distributed computing platform
24mAutomatic DDL Replication with pgEdge Distributed Postgres
49mPostgreSQL’s Journey to Distributed Databases
49mDistributed DDL Replication at Global Scale
50mSparta’s Dual Kingship and PostgreSQL Active-Active
53mThe journey towards active replication in PostgreSQL
44mThe journey towards active-active replication in PostgreSQL
20mHigh Throughput Replication with Integrated Membership Management
