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

What if pt-online-schema-change would be use simultaneously?

doborodoboro EntrantCurrent User Role Beginner
Hello everyone!

This is my first post in the Percona's community, so please take it easy with me :rolleyes:

My question is very simple:
What if pt-online-schema-change is used simultaneously?

I read from the docs the following:
pt-online-schema-change works by creating an empty copy of the table to alter, modifying it as desired, and then copying rows from the original table into the new table. When the copy is complete, it moves away the original table and replaces it with the new one. By default, it also drops the original table.

The thing is, I'm building a web application which may require the creation of new columns in the database schema... so I thought that making this tool accessible via web service was my salvation!
But... what could happen if two (or even three! :eek:) users execute the web service simultaneously?

Thank you very much for you time! :)


  • niljoshiniljoshi MySQL Sage Inactive User Role Beginner

    It depends though I would like to check, do you have any triggers on tables/db? Because the table (or tables) being altered can not have any triggers; pt-osc wants to be the only thing that puts triggers on a table. If triggers aren't a problem, then I dont think there should be any "concurrency" issues. I have bit doubt for foreign keys.

    I would suggest you should try to run it on test/stage servers and let us know if you are facing any issue.
  • doborodoboro Entrant Current User Role Beginner
    Hi nijoshi,

    thank you for the response. I don't have any triggers configured in the tables that I want to alter, so good news for me.

    I'm going to test it though in a couple of days and will post the results here.

    Thank you again!
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.