油面筋是什么做的| 笑面虎什么意思| 口干舌燥喝水也不解渴是什么原因| 食神生财是什么意思| 屈曲是什么意思| 为什么土豆不能炒鸡蛋| 养肝吃什么食物| 卡地亚属于什么档次| 烙馍卷菜搭配什么菜| 药物过敏用什么药| 巴基斯坦人说什么语言| 肌酐高是什么意思| 水云间什么意思| 边字是什么结构| 洛五行属性是什么| 水乳是什么| 小青蛙吃什么| 二尖瓣少量反流是什么意思| 脚踩棉花感见于什么病| #NAME?| 牛百叶是什么部位| 十月七号什么星座| 古惑仔为什么不拍了| 女性下面长什么样| 6月26日什么星座| 宝石蓝是什么颜色| 晚上适合做什么运动| 晨起嘴苦是什么原因| 海狗是什么| 始终如一是什么意思| 戒奶涨奶痛有什么缓解方法| 什么不| 自己开店做什么赚钱| 早饭吃什么| 马栗是什么植物| 为什么会得甲沟炎| 女性分泌物带血是什么原因| 骄傲什么意思| 什么是喜欢| 血塞通治什么病| 老虎属于什么科动物| 睾丸是什么形状的| 打喷嚏代表什么| 血压200意味着什么| 为什么人会打喷嚏| 可怜巴巴的意思是什么| 把脉左右手代表什么| 眼睛充血是什么原因| 善太息是什么意思| 吃什么东西容易消化| luxury什么牌子| 指标到校是什么意思| 什么叫肾功能不全| 地瓜什么时候成熟| 日本豆腐是什么做的| 一九六三年属什么生肖| 什么是坏血病| 10.16是什么星座| 一到晚上就咳嗽是什么原因| 临床诊断是什么意思| 中午吃什么饭| 乳腺增生是什么原因引起的| lpp什么意思| 农历七月二十什么日子| 外科医生是做什么的| 万马奔腾是什么生肖| 昌字五行属什么| 肺和大肠相表里是什么意思| 可乐杀精是什么意思| 文化大革命是什么时候开始的| marlboro是什么烟| 馄饨皮可以做什么美食| 催产素是什么| 脑白质是什么病| 手臂有痣代表什么| 肠胃炎能吃什么水果| 6岁儿童为什么会长腿毛| 剖腹产坐月子可以吃什么水果| 邹字五行属什么| 转氨酶高吃什么食物降得快| 丢包是什么意思| 乐松是什么药| 高危型hpv有什么症状| 金匮肾气丸有什么功效| 氰化钾是什么| 桥本氏病是什么病| 为什么会打喷嚏| 枸杞对女人有什么好处| 眼睛总有眼屎是什么原因| 什么的原始森林| 新西兰移民需要什么条件| 大便隐血弱阳性是什么意思| 根管是什么| 蒙脱石散不能和什么药一起吃| 66岁属什么生肖| 肺部有阴影是什么原因| 攥是什么意思| 无条件是什么意思| 膝盖疼痛挂什么科| mbi是什么意思| 扁桃体肥大是什么原因造成的| 梦见莲藕是什么意思| 氨基酸什么牌子好| 运筹帷幄是什么意思| 以讹传讹什么意思| 为什么来大姨妈会拉肚子| 进入icu病房意味着什么| 狗皮膏药什么意思| 舌头麻木是什么原因| 灌顶是什么意思| 耳朵痒用什么药| 强磁对人体有什么危害| 呕血是什么意思| 时光荏苒是什么意思| 小米性寒为什么养胃| 眉心跳动代表什么预兆| 一个兹一个子念什么| 肠道有息肉有什么症状| ny是什么牌子| 渎是什么意思| 吃氨糖有什么副作用| 水漫金山是什么意思| 硬卧是什么样子的| 245是什么意思| 所以我求求你别让我离开你是什么歌| 沅字的寓意是什么| 中药不能和什么一起吃| 灰指甲是什么样的| 什么气组词| 心率高有什么危害| 降压药有什么副作用| 蛋白电泳是查什么的| hpv是什么检查| 喝牛奶不能和什么一起吃| bpa是什么材料| 尿频尿急挂什么科| 婵字五行属什么| 睡眠不好会引起什么症状| 相恋纪念日送什么礼物| 蜂蜜水什么时候喝好| utc是什么时间| 可以组什么词语| 吃什么水果能降血压| 男生下面疼是什么原因| 国防部长什么级别| 戊日是什么意思| 2月2号什么星座| 就是什么意思| 狐狸吊坠有什么寓意| cpc是什么意思啊| 行政许可是什么意思| 纹眉失败擦什么淡化| 空心人是什么意思| 为什么会有灰指甲| 头皮痛是什么原因| 亿字五行属什么| 双相障碍是什么| 什么叫开门见床头| 记忆力减退吃什么药效果好| 伤春悲秋什么意思| 小腿疼痛什么原因引起的| 经常犯困是什么原因| 推背有什么好处和坏处| 梦见偷菜是什么意思| 喉咙有异物感看什么科| 过期药品属于什么垃圾| 打喷嚏是什么预兆| 女性做B超挂什么科| 为什么同房过后会出血| 汗手适合盘什么手串| 应届生是什么意思| 梦到狗是什么意思| 娇妻是什么意思| 什么人容易得心脏病| 血府逐瘀片主治什么病| 手指长水泡很痒是什么原因| 眼压高是什么症状| 月经量少吃什么排淤血| 吃什么补雌激素| 想是什么意思| 为什么会得扁平疣| 阈值是什么意思| 太监是什么生肖| 小番茄有什么营养价值| 鹭鸶是什么动物| 老年人口干是什么原因| 阴道内壁是什么样的| 什么是猥亵| 梅毒挂什么科| 6月22是什么星座| 眉毛下方有痣代表什么| 尿不尽挂什么科| 什么有什么造句| 子宫脱垂有什么症状| 血色素低吃什么补得快| 子宫肌瘤伴钙化是什么意思| 一学年是什么意思| 晚上睡觉手发麻是什么原因| 什么是复韵母| 三伏贴什么时候贴最好| 6月24日是什么日子| 长期便秘是什么原因| 授课是什么意思| 过命之交是什么意思| 摩羯女和什么星座最配| 虾为什么叫对虾| 过氧化氢一个加号什么意思| 麦五行属什么| trance什么意思| cif是什么意思| 驿站什么意思| 师公是什么意思| 结婚9年是什么婚| 电信查流量打什么电话| 吃饭后胃胀是什么原因| 什么是伤官| 真丝衣服用什么洗最好| 日语八嘎是什么意思| 绿油油的什么| 皮肤黑的人穿什么颜色的衣服显白| 肌肉痉挛用什么药能治好| 走马观花的走是什么意思| 嚼舌根是什么意思| 胃有灼烧感是什么原因| 1997年是什么生肖| 吃桑葚有什么好处| 睡觉趴着睡什么原因| 男戴观音女戴佛是什么意思| 什么什么直跳| 什么盐比较好| 小儿发烧吃什么食物好| 什么罩杯最大| 卵泡刺激素是什么意思| 角质层是什么| 98年虎是什么命| 经常放响屁是什么原因| 手指甲软薄是缺什么| 85年是什么命| 兽性大发是什么生肖| 送男人什么礼物最难忘| 女性尿臭味重是什么病| 孕妇头疼可以吃什么药| 12月14是什么星座| 金牛座什么性格| 什么是刷酸| 血细胞分析五分类是查什么的| 积阴德是什么意思| 清秋是什么意思| 寸止什么意思| 陈醋与香醋有什么区别| 为所当为什么意思| 么么什么意思| 下眼皮肿是什么原因| 看膝盖挂什么科| 做梦梦到钓鱼是什么意思| 氢化聚异丁烯是什么| 2005年是什么生肖| 什么都别说| 女人喝什么茶减肥好| 梦见数字是什么意思| 中位数什么意思| black什么颜色| 什么叫词牌名| oct什么意思| 百度
Skip to content

seanlook/gh-ost

?
?

Repository files navigation

gh-ost

ci replica-tests downloads release

GitHub's online schema migration for MySQL

gh-ost is a triggerless online schema migration solution for MySQL. It is testable and provides pausability, dynamic control/reconfiguration, auditing, and many operational perks.

gh-ost produces a light workload on the master throughout the migration, decoupled from the existing workload on the migrated table.

It has been designed based on years of experience with existing solutions, and changes the paradigm of table migrations.

How?

All existing online-schema-change tools operate in similar manner: they create a ghost table in the likeness of your original table, migrate that table while empty, slowly and incrementally copy data from your original table to the ghost table, meanwhile propagating ongoing changes (any INSERT, DELETE, UPDATE applied to your table) to the ghost table. Finally, at the right time, they replace your original table with the ghost table.

gh-ost uses the same pattern. However it differs from all existing tools by not using triggers. We have recognized the triggers to be the source of many limitations and risks.

Instead, gh-ost uses the binary log stream to capture table changes, and asynchronously applies them onto the ghost table. gh-ost takes upon itself some tasks that other tools leave for the database to perform. As result, gh-ost has greater control over the migration process; can truly suspend it; can truly decouple the migration's write load from the master's workload.

In addition, it offers many operational perks that make it safer, trustworthy and fun to use.

gh-ost general flow

Highlights

  • Build your trust in gh-ost by testing it on replicas. gh-ost will issue same flow as it would have on the master, to migrate a table on a replica, without actually replacing the original table, leaving the replica with two tables you can then compare and satisfy yourself that the tool operates correctly. This is how we continuously test gh-ost in production.
  • True pause: when gh-ost throttles, it truly ceases writes on master: no row copies and no ongoing events processing. By throttling, you return your master to its original workload
  • Dynamic control: you can interactively reconfigure gh-ost, even as migration still runs. You may forcibly initiate throttling.
  • Auditing: you may query gh-ost for status. gh-ost listens on unix socket or TCP.
  • Control over cut-over phase: gh-ost can be instructed to postpone what is probably the most critical step: the swap of tables, until such time that you're comfortably available. No need to worry about ETA being outside office hours.
  • External hooks can couple gh-ost with your particular environment.

Please refer to the docs for more information. No, really, read the docs.

Usage

The cheatsheet has it all. You may be interested in invoking gh-ost in various modes:

  • a noop migration (merely testing that the migration is valid and good to go)
  • a real migration, utilizing a replica (the migration runs on the master; gh-ost figures out identities of servers involved. Required mode if your master uses Statement Based Replication)
  • a real migration, run directly on the master (but gh-ost prefers the former)
  • a real migration on a replica (master untouched)
  • a test migration on a replica, the way for you to build trust with gh-ost's operation.

Our tips:

  • Testing above all, try out --test-on-replica first few times. Better yet, make it continuous. We have multiple replicas where we iterate our entire fleet of production tables, migrating them one by one, checksumming the results, verifying migration is good.
  • For each master migration, first issue a noop
  • Then issue the real thing via --execute.

More tips:

  • Use --exact-rowcount for accurate progress indication
  • Use --postpone-cut-over-flag-file to gain control over cut-over timing
  • Get familiar with the interactive commands

Also see:

What's in a name?

Originally this was named gh-osc: GitHub Online Schema Change, in the likes of Facebook online schema change and pt-online-schema-change.

But then a rare genetic mutation happened, and the c transformed into t. And that sent us down the path of trying to figure out a new acronym. gh-ost (pronounce: Ghost), stands for GitHub's Online Schema Transmogrifier/Translator/Transformer/Transfigurator

License

gh-ost is licensed under the MIT license

gh-ost uses 3rd party libraries, each with their own license. These are found here.

Community

gh-ost is released at a stable state, but with mileage to go. We are open to pull requests. Please first discuss your intentions via Issues.

We develop gh-ost at GitHub and for the community. We may have different priorities than others. From time to time we may suggest a contribution that is not on our immediate roadmap but which may appeal to others.

Please see Coding gh-ost for a guide to getting started developing with gh-ost.

Download/binaries/source

gh-ost is now GA and stable.

gh-ost is available in binary format for Linux and Mac OS/X

Download latest release here

gh-ost is a Go project; it is built with Go 1.15 and above. To build on your own, use either:

  • script/build - this is the same build script used by CI hence the authoritative; artifact is ./bin/gh-ost binary.
  • build.sh for building tar.gz artifacts in /tmp/gh-ost

Generally speaking, master branch is stable, but only releases are to be used in production.

Authors

gh-ost is designed, authored, reviewed and tested by the database infrastructure team at GitHub:

About

GitHub's Online Schema Migrations for MySQL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.4%
  • Shell 6.6%
先下手为强是什么意思 生育登记有什么用 异性朋友是什么意思 跳蛋是什么感觉 12min是什么意思
水洗棉是什么面料 什么时候放假 五月四号什么星座 早上起来腰疼是什么原因 蔓越莓有什么功效
cpa是什么证书 痰湿体质吃什么中成药 什么时候闰九月 做什么饭简单又好吃 欲望是什么
为什么胃有灼热感 狗感冒吃什么药 动脉硬化是什么意思 海员是干什么的 嗯嗯什么意思
来褐色分泌物是什么原因hcv7jop5ns6r.cn 右下腹疼是什么原因hcv8jop6ns2r.cn 天麻什么味道dajiketang.com 山见念什么hcv8jop5ns6r.cn 青皮是什么皮hcv9jop3ns1r.cn
肝火郁结是什么症状hcv9jop0ns3r.cn 八月一日是什么日子aiwuzhiyu.com 产后第一次来月经是什么颜色hlguo.com 手热脚凉是什么原因hcv9jop6ns0r.cn 小孩发烧可以吃什么水果hcv9jop1ns7r.cn
眼皮发肿是什么原因hcv8jop6ns8r.cn 脑鸣是什么原因引起的hcv8jop7ns7r.cn 泌乳素什么时候查最准确hcv8jop4ns4r.cn 洁面慕斯和洗面奶有什么区别hcv7jop9ns5r.cn 死不瞑目是什么意思dajiketang.com
酒精过敏是什么症状hcv9jop6ns1r.cn 露从今夜白下一句是什么hcv9jop2ns9r.cn 女人山根低代表什么hcv9jop3ns3r.cn 低血压食补吃什么最快hcv8jop5ns5r.cn 医院查怀孕做什么检查hcv8jop3ns6r.cn
百度