Announcement

Announcement Module
Collapse
No announcement yet.

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

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Hello everyone!

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

    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! ) users execute the web service simultaneously?



    Thank you very much for you time!
    Last edited by doboro; 06-10-2013, 01:34 PM.

  • #2
    Hi,

    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.

    Comment


    • #3
      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!

      Comment

      Working...
      X