
Gh-ost: GitHub's online schema migration tool for MySQL - samlambert
http://githubengineering.com/gh-ost-github-s-online-migration-tool-for-mysql/
======
zodvik
This is neatly done. Thanks to Github for open sourcing this.

~~~
tex0
A very impressive (ab)use of MySQL binlogs.

There is a lot to criticize about MySQL, but the master/slave (binlog)
architecture is incredibly flexible and with RBR it's even consistent ;)

------
caseyf
So this is cool...

But if you aren't github-sized try pt-online-schema-change for any and all
schema changes to production.

I suspect you'll love it as much as I do.

~~~
mcpherrinm
If you love pt-online-schema-change, you may want to check out Square's
tooling around it:
[https://github.com/square/shift](https://github.com/square/shift)

[https://corner.squareup.com/2016/04/shift.html](https://corner.squareup.com/2016/04/shift.html)

It provides a job running service, a UI for setting up and monitoring
migrations, and an authorization/peer review flow for them.

Maybe it could add support for gh-ost in the future.

------
mathnode
The README on github has a better explanation of how it works, and as I
suspected, this could also be achieved with Tungsten Replicator.

Good job though. Anything that helps people move away from Percona and their
"tooling" is a plus to me.

~~~
sciurus
Why do you think people should move away from Percona?

~~~
mathnode
Percona are flogging a dead horse called "Oracle" while at the same time
basically being an Oracle subsidiary without being Oracle, but it's basically
Oracle wrapped in scary perl scripts with backported features from better
forks.

If you were to meet me in person I would just say "Fuck Percona/Oracle and
their shitty shit".

------
wanderr
does anyone know if this supports RBR with --binlog-row-image=minimal? I could
only find mention of wanting RBR, no hints about whether it can handle minimal
format

------
mgkimsal
given that this needs access to the binary log, am I out of luck if I want to
use this with amazon rds? (I don't see a way to see/access the binlog at rds)

~~~
33degrees
You can definitely access the binary log on RDS:
[http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_L...](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html#USER_LogAccess.MySQL.Binarylog)

~~~
mgkimsal
thank you - still not sure if this tool could use it as it needs (perhaps
'streaming' the binlog?). I'm wrestling with making changes on a large RDS
table, but I also don't actually have total permission on the account as it
belongs to a client so I have to keep trying things, then seeing what breaks,
then asking for a change, then trying again.

~~~
33degrees
Apparently gh-ost won't work, but there are other tools that work fine on RDS:
I've been using
[https://github.com/soundcloud/lhm](https://github.com/soundcloud/lhm) On some
fairly large tables (30 million + rows) without any problems

~~~
mgkimsal
thanks - will look at this if I can't get the pt stuff working (already have
used that in the past, so would rather keep new tools to minimum). This
particular table is ... 200 million rows, give or take, and is a bugger to
deal with).

------
fidz
Pretty surprised that Github is not using Ruby for this project.

~~~
yla92
They have been using Go for a few other projects such as \- git-lfs (
[https://github.com/github/git-lfs](https://github.com/github/git-lfs) ) \-
hub ( [https://github.com/github/hub](https://github.com/github/hub) ) etc

------
pinaraf
So much work where there are many other solutions out there that don't have
that limitation : PostgreSQL, several NoSQL databases...

~~~
yladiz
While MySQL isn't the best db, and does have many flaws, it's asinine to say
that other solutions are wholly better. Everything has a set of limitations,
so just because something like Postgres doesn't have this specific limitation
doesn't mean it doesn't have others. It also may be more worth it to work
around the limitations of MySQL than to migrate all data to another database.

~~~
samlambert
Exactly this.

