# Pt-online-schema-change replication-filters information required

**URL:** <https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584>\
**Category:** Percona Toolkit\
**Created:** [December 21, 2021, 9:02am UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584 "2021-12-21T09:02:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 21, 2021, 9:02am UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/1 "2021-12-21T09:02:21Z")

</div>

I have read the below statement in the pt-online-schema-change documentation. So percona wont support schema change if master is having replication filters enabled? I have master instance which is having replication cluster with read and write only instance. Please advise your tool will help us or not?

- The tool refuses to operate if it detects replication filters. See `--[no]check-replication-filters` for details.

`--` `[no]check-replication-filters` [¶](https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#id4)

default: yes

Abort if any replication filter is set on any server. The tool looks for server options that filter replication, such as binlog\_ignore\_db and replicate\_do\_db. If it finds any such filters, it aborts with an error.

If the replicas are configured with any filtering options, you should be careful not to modify any databases or tables that exist on the master and not the replicas, because it could cause replication to fail. For more information on replication rules, see [MySQL :: MySQL 8.0 Reference Manual :: 17.2.5 How Servers Evaluate Replication Filtering Rules](http://dev.mysql.com/doc/en/replication-rules.html).

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [December 21, 2021, 11:52am UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/2 "2021-12-21T11:52:22Z")

</div>

Hello, this is just a safety precaution as depending on the existing filters replication could break. If you are sure your filters are not related to the tables you want to alter then it should be ok for you to use it.

---

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 21, 2021, 12:35pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/3 "2021-12-21T12:35:37Z")

</div>

Checked my parameter group the below parameter all are false…Also in replication cluster level i didn’t see any of the parameter. Please confirm now? Also we need to stop replication whenever we need to use pt-online-schema-change?  
replicate-do-db  
replicate-do-table  
replicate-ignore-db  
replicate-ignore-table  
replicate-wild-do-table  
replicate-wild-ignore-table

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [December 21, 2021, 12:50pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/4 "2021-12-21T12:50:18Z")

</div>

You don’t need to stop replication. pt-online-schema-change will throttle itself to avoid issues with replication. Double check if there are any filters at both master and replicas servers just to be safe

---

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 21, 2021, 1:20pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/5 "2021-12-21T13:20:18Z")

</div>

We do have our db in AWS RDS. I have checked all parameter group in primary and replication cluster instances, didn’t see any of the parameters i have mentioned earlier.

---

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 21, 2021, 1:27pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/6 "2021-12-21T13:27:45Z")

</div>

To access rds instance we do have mfa enabled. in this case how i can use percona tool kit to connect to mfa enabled instance…Please help?

---

<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:** [December 21, 2021, 2:42pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/7 "2021-12-21T14:42:54Z")

</div>

The percona toolkit does not support MFA to RDS. You will need to disable MFA or create a user specifically for RDS without MFA to use with percona toolkit.

---

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 21, 2021, 3:54pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/8 "2021-12-21T15:54:40Z")

</div>

Got this link while googling…Is this wont help me?

> **[Using a smartphone for two-factor authentication with Percona Server](https://www.percona.com/blog/2013/02/24/using-two-factor-authentication-with-percona-server/)**
>
> Percona cofounder & CTO Vadim Tkachenko explains how to use your smartphone to authenticate users in Percona Sever for MySQL.

---

<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:** [December 21, 2021, 3:57pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/9 "2021-12-21T15:57:40Z")

</div>

No, because that is not RDS.

---

<div class="post-metadata">

**Author:** ![seebhoopi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/seebhoopi/32/5306_2.png) [@seebhoopi](https://forums.percona.com/u/seebhoopi)\
**Post date:** [December 22, 2021, 4:49pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/10 "2021-12-22T16:49:59Z")

</div>

id is primary key in transaction\_log table. Is there anyway i can create the partition without modifying the primary key (id , created) ? If not in the same command (mentioned below) i can drop primary key, modify primary key and add partition?  
Please advise on this.  
pt-online-schema-change D=subscription,t=transaction\_log,[h=stm-partition-poc.us-east-2.rds.amazonaws.com](http://h=stm-partition-poc.us-east-2.rds.amazonaws.com),u=root --dry-run --alter “PARTITION BY RANGE(YEAR(created))(PARTITION p2014 VALUES LESS THAN (2015) ,PARTITION p2015 VALUES LESS THAN (2016) , PARTITION p2016 VALUES LESS THAN (2017) ,PARTITION p2017 VALUES LESS THAN (2018) ,PARTITION p2018 VALUES LESS THAN (2019) , PARTITION p2019 VALUES LESS THAN (2020) ,PARTITION p2020 VALUES LESS THAN (2021) ,PARTITION p2021 VALUES LESS THAN (2022) ,PARTITION p2022 VALUES LESS THAN (2023) ,PARTITION pMAXVALUE VALUES LESS THAN (MAXVALUE) );” --no-drop-new-table --no-drop-old-table --ask-pass  
Enter MySQL password:

# A software update is available:

Operation, tries, wait:  
analyze\_table, 10, 1  
copy\_rows, 10, 0.25  
create\_triggers, 10, 1  
drop\_triggers, 10, 1  
swap\_tables, 10, 1  
update\_foreign\_keys, 10, 1  
Starting a dry run. `subscription`.`transaction_log` will not be altered. Specify --execute instead of --dry-run to alter the table.  
Creating new table…  
Created new table subscription.\_transaction\_log\_new OK.  
Altering new table…  
Not dropping the new table `subscription`.`_transaction_log_new` because --no-drop-new-table was specified. To drop the new table, execute:  
DROP TABLE IF EXISTS `subscription`.`_transaction_log_new`;  
Dry run complete. `subscription`.`transaction_log` was not altered.  
(in cleanup) Error altering new table `subscription`.`_transaction_log_new`: DBD::mysql::db do failed: A PRIMARY KEY must include all columns in the table’s partitioning function [for Statement “ALTER TABLE `subscription`.`_transaction_log_new` PARTITION BY RANGE(YEAR(created))(PARTITION p2014 VALUES LESS THAN (2015) ,PARTITION p2015 VALUES LESS THAN (2016) , PARTITION p2016 VALUES LESS THAN (2017) ,PARTITION p2017 VALUES LESS THAN (2018) ,PARTITION p2018 VALUES LESS THAN (2019) , PARTITION p2019 VALUES LESS THAN (2020) ,PARTITION p2020 VALUES LESS THAN (2021) ,PARTITION p2021 VALUES LESS THAN (2022) ,PARTITION p2022 VALUES LESS THAN (2023) ,PARTITION pMAXVALUE VALUES LESS THAN (MAXVALUE) );”] at /usr/bin/pt-online-schema-change line 9425.

Error altering new table `subscription`.`_transaction_log_new`: DBD::mysql::db do failed: A PRIMARY KEY must include all columns in the table’s partitioning function [for Statement “ALTER TABLE `subscription`.`_transaction_log_new` PARTITION BY RANGE(YEAR(created))(PARTITION p2014 VALUES LESS THAN (2015) ,PARTITION p2015 VALUES LESS THAN (2016) , PARTITION p2016 VALUES LESS THAN (2017) ,PARTITION p2017 VALUES LESS THAN (2018) ,PARTITION p2018 VALUES LESS THAN (2019) , PARTITION p2019 VALUES LESS THAN (2020) ,PARTITION p2020 VALUES LESS THAN (2021) ,PARTITION p2021 VALUES LESS THAN (2022) ,PARTITION p2022 VALUES LESS THAN (2023) ,PARTITION pMAXVALUE VALUES LESS THAN (MAXVALUE) );”] at /usr/bin/pt-online-schema-change line 9425.

---

<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:** [December 23, 2021, 8:19pm UTC](https://forums.percona.com/t/pt-online-schema-change-replication-filters-information-required/13584/11 "2021-12-23T20:19:24Z")

</div>

> [@seebhoopi](#):
>
> A PRIMARY KEY must include all columns in the table’s partitioning function

All unique keys of a mysql table must contain the partition column. Since PRIMARY KEY is a UNIQUE KEY, then the PRIMARY KEY must include the partitioning column.
