0

We used pt-online-schema-change tool on number of our tables. We ran up into a problem of data inconsistency. We lost some of our data. The way we implemented was on slave and replication was also stopped while the operation was going on.

Is there anyway this tool can loose some data too during the operation, we have fairly large tables in hundreds of million of rows.

  • 1
    I hate stating the obvious - but backups are your friend. Before running any sort of programme on your data, you should backup. However, Percona has a very good reputation with MySQL - are you sure that you actually lost data? – Vérace Aug 20 '15 at 16:42
  • Your question is unclear, but it sounds as if you ran it against a slave server, not against the master... thereby changing the slave's schema so that it no longer matched the master. If so, why would you do this? – Michael - sqlbot Aug 21 '15 at 3:29
  • Michael as you know it is a common operation to make schema changes on slave for ease of use and avoiding table locks/downtime etc. We removed some duplicate indexes, nothing major that would effect replication data issues. – roger moore Aug 21 '15 at 8:52
  • In 5.6, ALTER TABLE ... ALGORITHM=INPLACE quickly removes indexes without the need for pt-osc. – Rick James Aug 22 '15 at 6:58
  • Was replication left on the entire time? Was it "caught up" when you discovered the loss? – Rick James Aug 22 '15 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.