pt-table-checksum

Hi,

we use checksum’s to run for a couple of hours everyday during non peak hours and kill it after 2 hours. Next day it will run again for 2 hours and get killed. In this scenario, the --resume option from ( percona-toolkit/2.0/pt-table-checksum) is useful to let the every second day checksum’s continue from the last day’s last chuck where it killed.

But the same option --resume stops the checksum process to run after one complete run on the data set. It will not start automatically to run the checksum’s from the first chunk again of the full dataset for the second time.

Is there an option to let the checksum’s continue forever on the same dataset repeatedly as the data gets updated on master and replicates to slave regularly.

First of all, pt-table-checksum is not a third party tool, but just part of Percona Toolkit, so this post should be in another category.

If I understand correctly, you would like to run the same command each time, regardless of whether it has finished completely before or not.
Right now there is no such option that would truncate the checksums table after the full dataset was checksum.
But I think you could craft a little bash script that does start pt-table-checksum --resume only if previous run was intrerrupted, and start without --resume otherwise. In the second case, the tool removes old checksum data automatically. Additionally you could automatically run a report query from differences on slave after each complete run.