github / github/gh-ost

fail in case of adding unique index by default

Open
#477 1 comment 0 reactions 1 assignee Claimed by @shlomi-noach View on GitHub
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

Hi,
I'm about https://github.com/github/gh-ost/issues/167.
We're faced with the same behavior and it was unexpected for us.
Previously we used `pt-online-schema-change` and it failed and showed a query to check if there were duplicated entries when it detected adding unique index.
Didn't you think about adding flag like `-allow-unique-key` and fail in case of adding an unique key by default?
Or adding something like `-fail-on-adding-unique-key` which will enable checking for adding an unique key.
`pt-online-schema-change`'s `check-unique-key-change` flag documented here: https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html#id7
It would be great to have the same behavior in `gh-ost`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.