pt-online-schema-change emulates the way that MySQL alters tables internally, but it works on a copy of the table you wish to alter. It executes INSERT statements to import the data, that runs in a single connection to fill the new table. In this repository, there is a script called myloader_pt-osc.sh that uses myloader to execute parallel INSERTs, instead of using pt-online-schema-change internal tooling, but it also uses a patched version of pt-online-schema-change.
Patch pt-online-schema-change
There are 2 changes that we needed to perform on pt-online-schema-change:
1- Be able to stop the execution after the copy of the table is
created
2- Tell pt-online-schema-change that no data needs to be imported
We are …
[Read more]