# Use of pt-table-checksum in master-master environments

**URL:** <https://forums.percona.com/t/use-of-pt-table-checksum-in-master-master-environments/2399>\
**Category:** Other Tools\
**Created:** [February 7, 2012, 6:36pm UTC](https://forums.percona.com/t/use-of-pt-table-checksum-in-master-master-environments/2399 "2012-02-07T18:36:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Volans](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@Volans](https://forums.percona.com/u/Volans)\
**Post date:** [February 7, 2012, 6:36pm UTC](https://forums.percona.com/t/use-of-pt-table-checksum-in-master-master-environments/2399/1 "2012-02-07T18:36:00Z")

</div>

This topic follows this question on Launchpad

The original question was:  
I would like to know if it is safe (from the replication point of view) to run pt-table-checksum toolkit in environments with a master-master MySQL configuration with slaves like this one:

A == B| |C D

Masters:  
[LIST]  
[_] A is slave of B B is slave of A  
[/LIST]  
Slaves:  
[LIST]  
[_] C is slave of A D is slave of B  
[/LIST]  
The documentation of the pt-table-checksum do not discuss about such a configuration, unlike the pt-table-sync documentation for example.

In addition to the safety of the tool, I would like also to know if running pt-table-checksum on server A, automatically make the checksums on all the other servers.

The last question was:

I agree with your reply (that of Baron), just wondering why are you referring to a “passive master”.

The configuration I have explained is an active-active master-master replication where both A and B are active masters. The same arguments can be applied also in this case?

Thank you for your attention.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [February 8, 2012, 12:41pm UTC](https://forums.percona.com/t/use-of-pt-table-checksum-in-master-master-environments/2399/2 "2012-02-08T12:41:23Z")

</div>

One of the cardinal rules of MySQL replication is that you should never write to more than one server. Based on that, you should have an active/passive master/master configuration, and you should run this tool on the active master, not the passive master, because the writes should all go to one server.

---

<div class="post-metadata">

**Author:** ![Volans](https://avatars.discourse-cdn.com/v4/letter/v/ecc23a/32.png) [@Volans](https://forums.percona.com/u/Volans)\
**Post date:** [February 8, 2012, 12:58pm UTC](https://forums.percona.com/t/use-of-pt-table-checksum-in-master-master-environments/2399/3 "2012-02-08T12:58:04Z")

</div>

Obviously I agree with the rule, in this case both servers are active for different projects/schema in order to distribute the load and avoid to have a single server heavy loaded and the other one in standby.  
So applying your suggestion to our structure leads to run the pt-table-checksum on one schema at a time on the active master for that schema/project.

Thanks for you clarification.
