Understanding Logical Decoding and Replication
summary
Explains that PostgreSQL 9.4 adds logical replication slots and a plugin API that reads WAL, decodes changes, and exposes them over the replication protocol or SQL functions; shows a working decoder that emits decoder-generated SQL and a background worker that applies changes to a second master; warns that it produces one change per tuple (bulk COPY of 1M rows yields 1M changes), requires max_replication_slots and exported snapshots handling, and demonstrates an async multimaster prototype that actually works.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 3:15Where is Logical Decoding
- 4:06What is Logical Decoding
- 5:38Replication Slots
- 7:55Physical Slots
- 9:00Reputation Slots
- 10:42Logical Replication Slots
- 12:35Export Snapshots
- 17:28Output Decoding
- 19:53Replica Identity
- 24:01Replication
- 27:57Synchronous Commit
- 29:30Basic Understanding
- 34:07Hacking
- 40:10SQL Interface
- 41:31Replication Protocol
- 44:34Online Upgrade
- 50:49Receiving Changes
related talks
29mLogical replication theory and concepts
31mPast, Present, and Future: Logical Decoding and Replication in PostgreSQL
22mHazards of logical decoding in PostgreSQL
59mLogical Replication...LIVE!
53mThe journey towards active replication in PostgreSQL
56mLogical Replication of DDLs
38mPostgres 16 highlight: Logical decoding on standby
48mPostgreSQL Replication: 20 Pitfalls and Solutions
