Mysql – Online Schema change when DB has existing triggers

mariadbMySQLschema

I'm doing some due diligence before attempting a MariaDB schema change that really needs to be performed online, but seems like I'm going to have issues with the existing DB triggers in using a tool like Percona online schema change, Github gh-ost and even Facebook's online schema change. Are there any options that I am missing out there? Any resources to recommendations to minimize downtime?

Best Answer

Yes there are.

DB doesn't have any triggers. A table can has triggers. If you want to alter the table which hasn't fulltext index maybe online DDL can help you.(It is implemented in MySQL/MariaDB)

But gh-ost is the best choose when you have triggers on the table.

Percona Online schema change and another tools such as oak-online-alter-table,soundcloud/lhm, facebook-osc are good when your table doesn't have any triggers. But in MariaDB 10.2 you can create multiple triggers for the same event So maybe they can work (I did not test)

Tools that maybe you didn't know:

https://github.com/soundcloud/lhm

https://github.com/shlomi-noach/openarkkit

https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html