Using pt-table-checksum with named slave (multiple masters replicating to one slave)

Hi,

I am trying to use pt-table-checksum on two master servers that replicate to one slave.

So there are two master servers, A and B, with different databases on each. Then there is one slave server, C, which runs two named slaves to replicate the two master servers. In other words

SHOW SLAVE ‘A’ STATUS\G;
SHOW SLAVE ‘B’ STATUS\G;

shows the two slave processes. For those not familiar, this setup is used because separate slave servers for each master would result in one unnecessary server.

The problem is it seems pt-table-checksum runs a ‘SHOW SLAVE STATUS’ check and with this setup that returns an empty set, so pt-table-checksum thinks the slave us not running which in fact it is.

Any way to run pt-table-checksum while telling it to access the named slave on the slave server?

Thank you.

1 Like

Hello

To use pt-table-checksum with multi sourse master you can use --channel flag

--channel ``

type: string

Channel name used when connected to a server using replication channels. Suppose you have two masters, master_a at port 12345, master_b at port 1236 and a slave connected to both masters using channels chan_master_a and chan_master_b. If you want to run pt-table-sync to syncronize the slave against master_a, pt-table-sync won’t be able to determine what’s the correct master since SHOW SLAVE STATUS will return 2 rows. In this case, you can use –channel=chan_master_a to specify the channel name to use in the SHOW SLAVE STATUS command.

Regards,
Denis Subbota.
Managed Services, Percona.

1 Like