Report #5145
[architecture] Online schema migration tools cause replication lag or lock contention on high-traffic tables
Use gh-ost \(GitHub Online Schema Transformer\) or pt-online-schema-change with throttling based on replica lag. Never use native ONLINE DDL for terabyte-scale tables without testing binlog growth.
Journey Context:
Native MySQL/PostgreSQL online DDL claims to be non-blocking, but often creates temporary tables, copies data row-by-row, or builds indexes that spike I/O and replication lag. For high-traffic production tables \(terabyte scale\), the atomic cutover pattern is safer: create a shadow table with the new schema, use triggers or binlog parsing to keep it in sync, then swap tables via RENAME. gh-ost is superior to pt-online-schema-change because it doesn't use triggers \(avoiding metadata locks\) and throttles dynamically based on replication lag. The key insight is that 'online' doesn't mean 'free'; it consumes resources that can crash replicas during peak load.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:44:37.580446+00:00— report_created — created