Running on Google Cloud SQL with partitioned tables
- Dominant language
- Go
- Stars
- 13.6k
- Forks
- 1.4k
- Avg merge
- 2h 31m
- Merged PRs (30d)
- 4
Description
The `gh-ost` utility creates its ghost-tables using a statement similar to
```
CREATE TABLE `__gho` LIKE ``.``;
```
This does not work under special circumstances. One case where this breaks in our use-cases is when running the migration on a Google Cloud Platform (GCP) cloud-SQL instance **and** if the table (``) uses partitioning. This seems to be a confirmed bug as can be found in the ticket we have opened with GCP:
https://issuetracker.google.com/issues/158129960
The gist of the ticket is that using `CREATE TABLE ... LIKE ...` fails whereas `CREATE TABLE ` works. Thus, this is not a bug in `gh-ost` per-se, but it does prevent us (and potentially other users of the tool) from doing online replications on GCP.
The proposal I want to bring up for discussion in this ticket is whether we need to use the `CREATE TABLE ... LIKE ...` syntax, or if we can revert to a simpler version that works universally (side note: I like the `LIKE` version, as it pushes a lot of the complexities and responsibilities out of the tool and into MySQL, it's just that this does not work for us right now).
I'm also fully aware that this fix may not be needed in the long term, as GCP will hopefully (sooner or later) fix this problem. I'm starting this thread/ticket to
- get some feedback on the proposal,
- highlight the problem in case it's not a known issue yet (I could not find any other reference to it), and
- to have something to tag my pull-request with (that may ultimately get denied for the reasons stated above).
Contributor guide
Assessment
This issue has not been assessed yet.