Not the answer you need?
Register and ask your own question!

can pt-online-schema-change pause after copy but before table rename

cwbrumettcwbrumett EntrantCurrent User Role Novice
We have a scenario where pt-online-schema-change is causing issues with our downstream ETL tool (Attunity) happening when the new table gets renamed to the old.

Is it possible to have pt-online-schema-change copy all the data (including all incoming changes) into the new altered table and then pause (and still process incoming records into both the original and the new table). That would allow us to stop our always-on ETL tool. Then manually trigger pt-online-schema-change to do the table rename (without losing any records after the pause).

Here's the command we are currently using for pt-online-schema-change if it provides insight.

pt-online-schema-change \
--nocheck-replication-filters \
--recursion-method="dsn=D=dba,t=dsn" \
--max-load Threads_running=150 \
--critical-load Threads_running=300 \
--execute \
--alter "DROP FOREIGN KEY __fk_tradeline_comp_client_id, \
DROP FOREIGN KEY __fk_tradeline_comp_eq_id, \
DROP FOREIGN KEY __fk_tradeline_comp_ex_id, \
DROP FOREIGN KEY __fk_tradeline_comp_tu_id, \
MODIFY tu_reportitemserialid BIGINT UNSIGNED DEFAULT NULL, \
MODIFY eq_reportitemserialid BIGINT UNSIGNED DEFAULT NULL, \
MODIFY ex_reportitemserialid BIGINT UNSIGNED DEFAULT NULL" \
h=localhost,D=SQL_AuditPro,t=tradeline_comp

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.