MySQL replication deep dive, and ideas for PostgreSQL
summary
Covers how MySQL writes a binary log (statement vs row formats and the mysqlbinlog decoder), how relay logs and IO/SQL threads move and apply entries, and how GTIDs let replicas compute missing transactions automatically. Explains the two‑phase commit between InnoDB redo/undo and the binary log, why fsync+exclusive binary‑log lock is the bottleneck, how group commit batches commits, and how parallel apply modes (commit‑order and rowset) reduce apply steps from 7 to 4 to 3 in the example.
AI-written summary · about
chapters (13)
- 0:00Introduction to MySQL
- 1:14MySQL logging mechanisms
- 3:08Binary log implementation
- 7:38Row vs statement format
- 12:36Replication architecture
- 15:23Global transaction IDs
- 18:57Using GTIDs
- 23:52Two-phase commit
- 29:54Group commit optimization
- 30:46Commit order parallel apply
- 33:35Write set parallel apply
- 38:52Dependency graph example
- 42:40Q&A and conclusion
related talks
20mMySQL Binary Logs From Replication Tool to Enterprise Event Platform
49mMySQL Replication — Advanced Features
31m#PostgreSQL to #MySQL: A DBA Perspective
43mHow MySQL Replication Works
53mMySQL replication setup, benefits, limitations
51mReplication latest features: the community sceptic roundup
29mLogical replication theory and concepts
44m10 reason why you should prefer PostgreSQL to
