Distributed snapshots and global deadlock detection
summary
Implements MVCC for a Postgres-based sharded system (Greenplum fork) by having the master assign distributed snapshots and distributed transaction IDs while each foreign server keeps local XIDs and a mapping to distributed IDs; visibility uses the distributed snapshot when a mapping exists and falls back to local snapshots otherwise, and mappings expire once a distributed XID is older than the snapshot’s oldest running XID. Adds a centralized background worker that builds a global wait-for graph, classifies dotted edges versus solid locks, removes nonblocking nodes greedily, and cancels a chosen session to break detected global deadlocks.
AI-written summary · about
chapters (18)
- 0:00Introduction to talk
- 1:58Sharding setup and problem
- 6:37Snapshot fundamentals
- 10:57Root cause analysis
- 12:03Distributed snapshots solution
- 17:48Mapping transaction IDs
- 21:29Recap of distributed snapshots
- 22:55Introduction to deadlock detection
- 24:00Single node deadlock example
- 24:43Global deadlock in clusters
- 26:11Postgres FDW cluster case
- 27:12Global deadlock detector design
- 28:15Wait-for graph construction
- 31:09Dialogue detection algorithm
- 32:54Eliminating unrelated nodes
- 35:02Case study one
- 37:35Case study two
- 40:02Q&A session
