Newb question: How wells does LiquiBase play with large tables and replication under MySQL?

We’re looking at using LiquiBase for managing (mainly for the revision control) for our MySQL servers, but I had a few questions based on past experience with schema changes and replication.

We have some large InnoDB tables that we have to use pt-online-schema-change to update due to table locking lasting more than 50 seconds causing writes to be dropped. How does LiquiBase Prevent this from happening?

Also, does LiquiBase have any problems (or risk breaking) replication to slaves? (Google serve for “liquibase mysql replication” doesn’t turn up a lot, so I was wondering if someone could point in the direction of docs/warnings/cases, etc.

Thanks!
-Adam

Liquibase is really only for schema/structure management, not data replication - I’m not sure if that is what you are asking or not.

If you are worried about things like “adding a column to a table causes the table to be locked for a long time” then you are correct to be worried - this is definitely something to be aware of when altering a schema, no matter how you do it. Liquibase doesn’t have any magic in this regard. One thing you can always do is use Liquibase with the ‘generateSQL’ option to preview what will actually be run. I did a quick Googling of pt-online-schema-change and Liquibase does not do anything like what that tool is trying to do - the SQL generated is more along the lines of “ALTER TABLE tablename…” rather than what that tool seems to be doing.

I don’t know a whole lot about database replication in MySQL at all, but basically you would need to follow the same steps as if you were doing schema changes ‘manually’ using SQL scripts, except that Liquibase is the one generating the SQL rather than having to custom-create it for each database.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/