Change Data Capture for a Brand New World
summary
PostgreSQL logical decoding replaces trigger‑based CDC by reading WAL with low overhead instead of doubling writes; use wal2json or protobuf plugins, pg_recvlogical or language drivers (psycopg2, JDBC) to consume changes, or push into Kafka via Debezium / Kafka Connect for durable, re‑readable streams. Beware: logical slots tie to one logical database, some plugins drop exotic types, DDL isn’t emitted without event triggers, failover can lose reader position, and built‑in publications/subscriptions currently require superuser workarounds. Netflix runs ~4,000 Kafka brokers at ~1 trillion messages/day as an example of scale.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:40Why Change Data Capture
- 2:45Example Table
- 3:15Dinosaurs
- 5:00Update Fields
- 5:40Variants
- 10:05Logical Replication
- 11:10Logical Decoding
- 11:55Output Formats
- 14:35Operational Concerns
- 16:25Postgres Setup
- 18:10JSON
- 19:10Postgres Logical
- 20:00Create a Slot
- 25:55The downside of this approach
- 27:30Kafka
- 32:25Kafka Connect
- 33:55Postgres
- 35:40Replication
- 37:05PubSub
- 37:55Demo
- 38:20Conclusion
