[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4942":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},4942,"gh-ost","github\u002Fgh-ost","github","GitHub's Online Schema-migration Tool for MySQL","",null,"Go",13396,1387,582,261,0,3,16,62,19,44.43,"MIT License",false,"master",[26,27],"mysql","schema-migrations","2026-06-12 02:01:06","# gh-ost\n\n[![ci](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Factions\u002Fworkflows\u002Fci.yml) [![replica-tests](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Factions\u002Fworkflows\u002Freplica-tests.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Factions\u002Fworkflows\u002Freplica-tests.yml) [![downloads](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002Fgithub\u002Fgh-ost\u002Ftotal.svg)](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Freleases) [![release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fgithub\u002Fgh-ost.svg)](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Freleases)\n\n#### GitHub's online schema migration for MySQL \u003Cimg src=\"doc\u002Fimages\u002Fgh-ost-logo-light-160.png\" align=\"right\">\n\n `gh-ost` is a triggerless online schema migration solution for MySQL. It is testable and provides pausability, dynamic control\u002Freconfiguration, auditing, and many operational perks.\n\n`gh-ost` produces a light workload on the master throughout the migration, decoupled from the existing workload on the migrated table.\n\nIt has been designed based on years of experience with existing solutions, and changes the paradigm of table migrations.\n\n\n\n## How?\n\nAll 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.\n\n`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](doc\u002Fwhy-triggerless.md).\n\nInstead, `gh-ost` [uses the binary log stream](doc\u002Ftriggerless-design.md) 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.\n\nIn addition, it offers many [operational perks](doc\u002Fperks.md) that make it safer, trustworthy and fun to use.\n\n![gh-ost general flow](doc\u002Fimages\u002Fgh-ost-general-flow.png)\n\n## Highlights\n\n- 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.\n- True pause: when `gh-ost` [throttles](doc\u002Fthrottle.md), it truly ceases writes on master: no row copies and no ongoing events processing. By throttling, you return your master to its original workload\n- Dynamic control: you can [interactively](doc\u002Finteractive-commands.md) reconfigure `gh-ost`, even as migration still runs. You may forcibly initiate throttling.\n- Auditing: you may query `gh-ost` for status. `gh-ost` listens on unix socket or TCP.\n- 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.\n- External [hooks](doc\u002Fhooks.md) can couple `gh-ost` with your particular environment.\n\nPlease refer to the [docs](doc) for more information. No, really, read the [docs](doc).\n\n## Usage\n\nThe [cheatsheet](doc\u002Fcheatsheet.md) has it all. You may be interested in invoking `gh-ost` in various modes:\n\n- a _noop_ migration (merely testing that the migration is valid and good to go)\n- 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)\n- a real migration, run directly on the master (but `gh-ost` prefers the former)\n- a real migration on a replica (master untouched)\n- a test migration on a replica, the way for you to build trust with `gh-ost`'s operation.\n\nOur tips:\n\n- [Testing above all](doc\u002Ftesting-on-replica.md), 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.\n- For each master migration, first issue a _noop_\n- Then issue the real thing via `--execute`.\n\nMore tips:\n\n- Use `--exact-rowcount` for accurate progress indication\n- Use `--postpone-cut-over-flag-file` to gain control over cut-over timing\n- Get familiar with the [interactive commands](doc\u002Finteractive-commands.md)\n\nAlso see:\n\n- [requirements and limitations](doc\u002Frequirements-and-limitations.md)\n- [common questions](doc\u002Fquestions.md)\n- [what if?](doc\u002Fwhat-if.md)\n- [the fine print](doc\u002Fthe-fine-print.md)\n- [Community questions](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fissues?q=label%3Aquestion)\n- [Using `gh-ost` on AWS RDS](doc\u002Frds.md)\n- [Using `gh-ost` on Azure Database for MySQL](doc\u002Fazure.md)\n\n## What's in a name?\n\nOriginally this was named `gh-osc`: GitHub Online Schema Change, in the likes of [Facebook online schema change](https:\u002F\u002Fwww.facebook.com\u002Fnotes\u002Fmysql-at-facebook\u002Fonline-schema-change-for-mysql\u002F430801045932\u002F) and [pt-online-schema-change](https:\u002F\u002Fwww.percona.com\u002Fdoc\u002Fpercona-toolkit\u002F2.2\u002Fpt-online-schema-change.html).\n\nBut 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\u002FTranslator\u002FTransformer\u002FTransfigurator\n\n## License\n\n`gh-ost` is licensed under the [MIT license](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fblob\u002Fmaster\u002FLICENSE)\n\n`gh-ost` uses 3rd party libraries, each with their own license. These are found [here](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Ftree\u002Fmaster\u002Fvendor).\n\n## Community\n\n`gh-ost` is released at a stable state, but with mileage to go. We are [open to pull requests](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md). Please first discuss your intentions via [Issues](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fissues).\n\nWe 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.\n\nPlease see [Coding gh-ost](doc\u002Fcoding-ghost.md) for a guide to getting started developing with gh-ost.\n\n## Download\u002Fbinaries\u002Fsource\n\n`gh-ost` is now GA and stable.\n\n`gh-ost` is available in binary format for Linux and Mac OS\u002FX\n\n[Download latest release here](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Freleases\u002Flatest)\n\n`gh-ost` is a Go project; it is built with Go `1.15` and above. To build on your own, use either:\n- [script\u002Fbuild](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fblob\u002Fmaster\u002Fscript\u002Fbuild) - this is the same build script used by CI hence the authoritative; artifact is `.\u002Fbin\u002Fgh-ost` binary.\n- [build.sh](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Fblob\u002Fmaster\u002Fbuild.sh) for building `tar.gz` artifacts in `\u002Ftmp\u002Fgh-ost-release`\n\nGenerally speaking, `master` branch is stable, but only [releases](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-ost\u002Freleases) are to be used in production.\n\n## Authors\n\n`gh-ost` is designed, authored, reviewed and tested by the database infrastructure team at GitHub:\n- [@jonahberquist](https:\u002F\u002Fgithub.com\u002Fjonahberquist)\n- [@ggunson](https:\u002F\u002Fgithub.com\u002Fggunson)\n- [@tomkrouper](https:\u002F\u002Fgithub.com\u002Ftomkrouper)\n- [@shlomi-noach](https:\u002F\u002Fgithub.com\u002Fshlomi-noach)\n- [@jessbreckenridge](https:\u002F\u002Fgithub.com\u002Fjessbreckenridge)\n- [@gtowey](https:\u002F\u002Fgithub.com\u002Fgtowey)\n- [@timvaillancourt](https:\u002F\u002Fgithub.com\u002Ftimvaillancourt)\n","gh-ost 是 GitHub 开发的一款用于 MySQL 的在线模式迁移工具。它采用无触发器的设计，通过解析二进制日志流来捕获表变更，并异步应用到影子表上，从而实现数据的逐步迁移。这种方式不仅减少了对主库性能的影响，还提供了暂停、动态控制和审计等高级功能，使得迁移过程更加灵活可控。gh-ost 适用于需要在不影响线上业务的情况下进行大规模数据库结构调整的场景，如添加索引、修改字段类型等操作。其独特的设计使其在处理复杂且高负载的生产环境时表现尤为出色。",2,"2026-06-11 03:01:40","top_language"]