michaeldejong | 2 years ago | on: Pgroll: zero-downtime, reversible schema migrations for Postgres
michaeldejong's comments
michaeldejong | 8 years ago | on: GitHub's online schema migration for MySQL
michaeldejong | 8 years ago | on: GitHub's online schema migration for MySQL
michaeldejong | 8 years ago | on: Managing database schema changes without downtime
michaeldejong | 8 years ago | on: Managing database schema changes without downtime
michaeldejong | 8 years ago | on: Managing database schema changes without downtime
There are tools that "replay" data changes though: - FB's OSC (https://www.facebook.com/notes/mysql-at-facebook/online-sche...) - GH's gh-ost (https://github.com/github/gh-ost)
michaeldejong | 8 years ago | on: Managing database schema changes without downtime
[0] http://code.openark.org/forge/openark-kit [1] https://github.com/github/gh-ost
michaeldejong | 8 years ago | on: Managing database schema changes without downtime
Unfortunately zero-downtime schema changes are even more complex than suggested here. Although the expand-contract method as described in the post is a good approach to tackling this problem, the mere act of altering a database table that is in active use is a dangerous one. I've already found that some trivial operations such as adding a new column to an existing table can block database clients from reading from that table through full table locks for the duration of the schema operation [2].
In many cases it's safer to create a new table, copy data over from the old table to the new table, and switch clients over. However this introduces a whole new set of problems: keeping data in sync between tables, "fixing" foreign key constraints, etc.
If there are others researching/building tooling for this problem, I'd love to hear from you.
[0] http://github.com/quantumdb/quantumdb
[1] https://speakerdeck.com/michaeldejong/icse-17-zero-downtime-...
[2] http://blog.minicom.nl/blog/2015/04/03/revisiting-profiling-...
[0] https://github.com/quantumdb/quantumdb