# Running pt-table-checksum against slaves that don't have all dbs as master

**URL:** <https://forums.percona.com/t/running-pt-table-checksum-against-slaves-that-dont-have-all-dbs-as-master/14628>\
**Category:** Percona Toolkit\
**Created:** [March 4, 2022, 7:46pm UTC](https://forums.percona.com/t/running-pt-table-checksum-against-slaves-that-dont-have-all-dbs-as-master/14628 "2022-03-04T19:46:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![williamt](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@williamt](https://forums.percona.com/u/williamt)\
**Post date:** [March 4, 2022, 7:46pm UTC](https://forums.percona.com/t/running-pt-table-checksum-against-slaves-that-dont-have-all-dbs-as-master/14628/1 "2022-03-04T19:46:09Z")

</div>

Is there any way to run pt-table-checksum in a mixed environment where some slaves have a full copy of the masters data and some slaves only have a few dbs?

Can pt-table-checksum be made smarter with a flag like --ignore-dbs-that-dont-exist ?  
The way i’ve been running it in the meantime is explicitly listing the dbs that exist on all the servers which isn’t ideal because some dbs don’t get checked.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [March 4, 2022, 9:59pm UTC](https://forums.percona.com/t/running-pt-table-checksum-against-slaves-that-dont-have-all-dbs-as-master/14628/2 "2022-03-04T21:59:00Z")

</div>

Unfortunately this is one caveat to using pt-table-checksum in environments with filtered databases and/or tables.

Since pt-table-checksum is always ran on the source, there’s no way to know which replicas have or do not have certain dbs/tables. pt-t-c does not run queries on the replicas. The checksum query is a REPLACE statement which is ONLY executed on the source and is then replicated and re-executed on each replica. This is why simply saying ‘ignore dbs that don’t exist’ won’t work because the query runs on the source, where all dbs/tables exist.
