Contents
How does pt-table-checksum work?
Usage. pt-table-checksum performs an online replication consistency check by executing checksum queries on the master, which produces different results on replicas that are inconsistent with the master. The optional DSN specifies the master host. If any data is different, you can resolve the problem with pt-table-sync.
What is checksum table?
CHECKSUM TABLE reports a checksum for the contents of a table. You can use this statement to verify that the contents are the same before and after a backup, rollback, or other operation that is intended to put the data back to a known state. This statement requires the SELECT privilege for the table.
Which command is used to verify the data consistency within replication streams in MySQL?
You may script pt-table-checksum / pt-table-sync steps and cron checksum script to periodically check the data consistency within replication stream.
What is the use of checksum in SQL Server?
CHECKSUM computes a hash value, called the checksum, over its argument list. Use this hash value to build hash indexes. A hash index will result if the CHECKSUM function has column arguments, and an index is built over the computed CHECKSUM value. This can be used for equality searches over the columns.
What causes skipping the table in PT-table-checksum?
Skipping the table, as in the second message example, is a common issue with pt-table-checksum and can be caused by different/outdated table statistics on the master or slave side. To alleviate this issue, make sure all your tables contain a primary or unique key. pt-table-checksum requires that to divide a table into chunks effectively.
What does PT table checksum do in MySQL?
If specified, pt-table-checksum doesn’t checksum any tables. It checks replicas for differences found by previous checksumming, and then exits. Your first command doesn’t seem to be able to connect to the slave host, which is why it doesn’t report any differences.
What happens to PT table checksum when replication stops?
If any replica has an error, or replication stops, pt-table-checksum pauses and waits. In addition, pt-table-checksum looks for common causes of problems, such as replication filters, and refuses to operate unless you force it to.
Is there a backwards compatible version of PT-table checksum?
The table referenced in that query is the checksum table, where the checksums are stored. Each row in the table contains the checksum of one chunk of data from some table in the server. Version 2.0 of pt-table-checksum is not backwards compatible with pt-table-sync version 1.0. In some cases this is not a serious problem.