Tuesday, October 17, 2017

[google-cloud-sql-discuss] Re: How to perform schema changes on replica?

Yes this is one possible solution. There are some problems with it too though. For example if you have foreign keys in other tables they will keep referencing old table and it will mess up your data if you allow a table without constraints to slip into production. You either need to briefly take down your app, disable key checks, and drop the old table or rebuild foreign keys for new table, which can take a lot of time too.

There is a `pt-online-schema-change` tool in Percona toolkit for doing exactly that but I've tried to avoid it because it still introduces additional load and IOPS to master instance while it is copying and converting tables.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/faa94087-e21f-4eaf-b39b-6be5bfa74a79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment