I have 2 MySQL servers with row-based replication between them. Both of them are masters and slaves for each other (active-active master-master setup).

If I understand it correctly pt-osc creates triggers to catch any changes while running. But from what I know triggers are not fired in a row-based replication environment. So I guess pt-osc is not able to catch changes made on the second master during the change, is it?

EDIT: While doing some tests and I saw that pt-osc was creating triggers on both masters which would cover changes from both sides. Still I'm quite unsure if I can safely do online changes in this environment.


The logic is more complex. (Caveat: This is not a definitive Answer to the Question, just more insight.)

  • Generally (probably in this case), the triggers should be only on the one machine.
  • RBR replicates the effect of inserts/etc, not the actual statements. That is what is needed on the Slave (aka other Master).
  • Are you 'writing' to both Masters? If so, that is a recipe for extra problems; I recommend you stop writing to the other Master while running pt-osc.

Also look into gh-ost, which uses the binlog in tricky ways. (Obviously, you have the binlog turned on.)

  • Yes, I'm writing to both Masters but I would have to wait for a maintenance window to stop writing to one of them. Thank you for pointing out gh-ost. – Mrskman Jan 16 '19 at 8:07
  • 1
  • @Mrskman - Why do you need to wait for a maintenance window? Pretend one of your Masters has failed. You need to test that anyway! – Rick James Jan 16 '19 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.