We are using two MYSQL servers in ring replication where master is also a slave of the other master. Both have slaves connected to each other.
We want to run pt-online-schema-change to add couple of columns but we are not sure if it may break the replication due to ring replication in place. Any advice would be great.
MySQL Percona Toolkit – Using Pt-online Schema Change on Multi Master
MySQLperconapercona-toolkit
Related Question
- MySQL Replication – Multi-Master and Slaves Setup
- MySQL Replication – Safely Change innodb_buffer_pool_size on Master
- Mysql – pt-online-schema-change MySQL Error: This version of MySQL doesn’t yet support ‘multiple triggers with the same action time and event for one table’
- MySQL – Multi-Master Active-Active Replication Issues
- MySQL Semi-synchronous replication with Multi-Master
- Mysql – Is it safe to use pt-online-schema-change in a multimaster environment
Best Answer
If you use a dsn table as a recursion method, then pt-online-schema-change can do the job for you. This is documented here:
https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#cmdoption-pt-online-schema-change-recursion-method
If you use the hosts method, though, pt-osc will detect that SHOW SLAVE STATUS returns more than 1 row, but it considers the topology is using replication channels. You would get this error:
For setting up topologies to test different circumstances, dbdeployer is a useful tool https://github.com/datacharmer/dbdeployer#replication-topologies.
Disclosure: I work for Percona