|
|
|
|
|
by greenleafjacob
3011 days ago
|
|
This is a more or less solved problem in MySQL with pt-online-schema-change [1] which accomplishes “create a new table ...” with the “copying data over” done for you using triggers and “switch clients over” done using a table rename, all within a tool with the longest full table lock held during the rename step. Some of this appears to be available in MySQL itself as of 5.6, but regardless all of this is fraught with edge cases. [1] https://www.percona.com/doc/percona-toolkit/LATEST/pt-online... |
|
[0] http://code.openark.org/forge/openark-kit [1] https://github.com/github/gh-ost