gh-ost version 1.0.17 is now released, with various additions and fixes. Here are some notes of interest:
Hooks
gh-ost
now supports hooks. These are your own executables that gh-ost
will invoke at particular points of interest (validation pass, about to cut-over, success, failure, status, etc.)
gh-ost
will set various environment variables for your executables to pick up, passing along such information as migrated/ghost table name, elapsed time, processed rows, migrated host etc.
Sub-second lag control
At GitHub we’re very strict about replication lag. We keep it well under 1
second at most times. gh-ost
can now identify sub-second lag on replicas (well, you need to supply with the right query). Our current production migrations are set by default with --max-lag-millis=500
or less, and our most intensive migrations keep replication lag well below 1sec
or even below 500ms
No SUPER
The SUPER
privilege is required to set global binlog_format='ROW'
and for STOP SLAVE; START SLAVE;
If you know your replica has RBR, you can pass --assume-rbr
and skips those steps.
RDS
Hooks + No Super = RDS, as seems to be the case. For --test-on-replica
you will need to supply your own gh-ost-on-stop-replication
hook, to stop your RDS replica at cut-over phase. See this tracking issue Continue reading » “gh-ost 1.0.17: Hooks, Sub-second lag control, Amazon RDS and more”