There is a dedicated standby where we are doing schema changes like index addition, defragmentation before switching that as a master.
Q1 : When running pt-osc with replication, it fails with 1032 upon completion. If we stop the SQL_thread this is not happening. Is there any flag in pt-osc which can take care of this?
Q2 : When running on a dedicated server, can we make use of multiple threads instead of doing on a single thread. (like myloader)
Q1: Do you have any triggers or stored procedures acting on this table? 1032 is “Key Not Found” which means some sort of issue with replication during the alter. No, there is no option in pt-osc to stop replication. You could absolutely write a plugin for pt-osc to do this at the stage before beginning the migration. Check the docs for complete examples.
Q2: Unfortunately no, pt-osc does not use multiple threads to copy the data.
Thanks @matthewb .
Q1 : No triggers but it’s multi-threaded replication, let me see if I can create one reproducible case.
Q2 : Is there any future plans? Consider an option --dedicated where this tool will do it in multiple threads. Advice for the customer is, with --dedicated flag it doesn’t maintain consistency. People can do it on a optimiser or standby node then they can promote.