Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using pt-table-checksum and pt-table-sync to check for differences in my replicas. when I use pt-table-sync with the -print option, I can only see the master values.

How can I show the conflicting slave values as well? I want to see if I can find a pattern of which those diffs occur by.

share|improve this question

Using pt-table-sync with these options

  • --print
  • --sync-to-master

will report the SQL changes to execute on the Slave to make the Slave match the Master.

The Master is simply connected for comparison purposes.

The Percona Documenation on --print option says

Print queries that will resolve differences.

If you don’t trust pt-table-sync, or just want to see what it will do, this is a good way to be safe. These queries are valid SQL and you can run them yourself if you want to sync the tables manually.

For emphasis : Do not execute the output of --print AND --sync-to-master on a Master. Execute it on a Slave only.

If you are using Circular Replication, do this

echo "SET SQL_LOG_BIN = 0;" > ChangesToSlave.sql
pt-table-sync --print --sync-to-master ... >> ChangesToSlave.sql

then you can run ChangesToSlave.sql on a Slave.

share|improve this answer
Good answer, but it does not provide a real answer to the question: What are the conflicting values of the row on the slave side? What I did was looking in the checkums table pt-table-checksum created using a very small chunk size - this pointed me to a bunch of rows easy to spot the difference myself. It turned out to be a different timezone producing different NOW() values. – gertvdijk Dec 14 '12 at 22:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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