You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/requirements-and-limitations.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
- You will need to have one server serving Row Based Replication (RBR) format binary logs. Right now `FULL` row image is supported. `MINIMAL` to be supported in the near future. `gh-ost` prefers to work with replicas. You may [still have your master configured with Statement Based Replication](migrating-with-sbr.md) (SBR).
6
6
7
+
- If you are using a replica, the table must have an identical schema between the master and replica.
8
+
7
9
-`gh-ost` requires an account with these privileges:
8
10
9
11
-`ALTER, CREATE, DELETE, DROP, INDEX, INSERT, LOCK TABLES, SELECT, TRIGGER, UPDATE` on the database (schema) where your migrated table is, or of course on `*.*`
@@ -15,20 +17,29 @@ The `SUPER` privilege is required for `STOP SLAVE`, `START SLAVE` operations. Th
15
17
16
18
- Switching your `binlog_format` to `ROW`, in the case where it is _not_`ROW` and you explicitly specified `--switch-to-rbr`
17
19
- If your replication is already in RBR (`binlog_format=ROW`) you can specify `--assume-rbr` to avoid the `STOP SLAVE/START SLAVE` operations, hence no need for `SUPER`.
20
+
18
21
- Running `--test-on-replica`: before the cut-over phase, `gh-ost` stops replication so that you can compare the two tables and satisfy that the migration is sound.
19
22
20
23
### Limitations
21
24
22
25
- Foreign keys not supported. They may be supported in the future, to some extent.
26
+
23
27
- Triggers are not supported. They may be supported in the future.
28
+
24
29
- MySQL 5.7 generated columns are not supported. They may be supported in the future.
30
+
25
31
- The two _before_ & _after_ tables must share some `UNIQUE KEY`. Such key would be used by `gh-ost` to iterate the table.
26
32
- As an example, if your table has a single `UNIQUE KEY` and no `PRIMARY KEY`, and you wish to replace it with a `PRIMARY KEY`, you will need two migrations: one to add the `PRIMARY KEY` (this migration will use the existing `UNIQUE KEY`), another to drop the now redundant `UNIQUE KEY` (this migration will use the `PRIMARY KEY`).
33
+
27
34
- The chosen migration key must not include columns with `NULL` values.
28
35
-`gh-ost` will do its best to pick a migration key with non-nullable columns. It will by default refuse a migration where the only possible `UNIQUE KEY` includes nullable-columns. You may override this refusal via `--allow-nullable-unique-key` but **you must** be sure there are no actual `NULL` values in those columns. Such `NULL` values would cause a data integrity problem and potentially a corrupted migration.
36
+
29
37
- It is not allowed to migrate a table where another table exists with same name and different upper/lower case.
30
38
- For example, you may not migrate `MyTable` if another table called `MYtable` exists in the same schema.
39
+
31
40
- Amazon RDS and Google Cloud SQL are currently not supported
32
41
- We began working towards removing this limitation. See tracking issue: https://github.com/github/gh-ost/issues/163
42
+
33
43
- Multisource is not supported when migrating via replica. It _should_ work (but never tested) when connecting directly to master (`--allow-on-master`)
44
+
34
45
- Master-master setup is only supported in active-passive setup. Active-active (where table is being written to on both masters concurrently) is unsupported. It may be supported in the future.
Copy file name to clipboardExpand all lines: doc/the-fine-print.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,27 @@ Here are technical considerations you may be interested in. We write here things
4
4
5
5
# Connecting to replica
6
6
7
-
`gh-ost` prefers connecting to replica. If your master uses Statement Based Replication, this is a _requirement_.
7
+
`gh-ost` prefers connecting to a replica. If your master uses Statement Based Replication, this is a _requirement_.
8
8
9
9
What does "connect to replica" mean?
10
10
11
11
-`gh-ost` connects to the replica as a normal client
12
12
- It additionally connects as a replica to the replica (pretends to be a MySQL replica itself)
13
-
- It auto-detects master
13
+
- It auto-detects the master
14
14
15
-
`gh-ost` reads the RBR binary logs from the replica, and applies events onto the master as tables are being migrated.
15
+
`gh-ost` reads the RBR binary logs from the replica, and applies events onto the master as part of the table migration.
16
16
17
17
THE FINE PRINT:
18
18
19
19
- You trust the replica's binary logs to represent events applied on master.
20
-
If you don't trust the replica, if you suspect there's data drift between replica & master, take notice. If your master is RBR, do instead connect `gh-ost` to master, via `--allow-on-master` (see [cheatsheet](cheatsheet.md)).
21
-
Our take: we trust replica data; if master dies in production, we promote a replica. Our read serving is based on replica(s).
22
-
20
+
- If you don't trust the replica, or if you suspect there's data drift between replica & master, take notice.
21
+
- If the table on the replica has a different schema than the master, `gh-ost` likely won't work correctly.
22
+
- Our take: we trust replica data; if master dies in production, we promote a replica. Our read serving is based on replica(s).
23
+
24
+
- If your master is RBR, do instead connect `gh-ost` to master, via `--allow-on-master` (see [cheatsheet](cheatsheet.md)).
25
+
23
26
- Replication needs to run.
24
-
This is an obvious, but worth stating. You cannot perform a migration with "connect to replica" if your replica lags. `gh-ost` will actually do all it can so that replication does not lag, and avoid critical operations at such time when replication does lag.
27
+
-This is an obvious, but worth stating. You cannot perform a migration with "connect to replica" if your replica lags. `gh-ost` will actually do all it can so that replication does not lag, and avoid critical operations if replication is lagging.
25
28
26
29
# Network usage
27
30
@@ -30,12 +33,12 @@ THE FINE PRINT:
30
33
THE FINE PRINT:
31
34
32
35
-`gh-ost` delivers more network traffic than other online-schema-change tools, that let MySQL handle all data transfer internally. This is part of the [triggerless design](triggerless-design.md).
33
-
Our take: we deal with cross-DC migration traffic and this is working well for us.
36
+
-Our take: we deal with cross-DC migration traffic and this is working well for us.
34
37
35
38
# Impersonating as a replica
36
39
37
-
`gh-ost` impersonates as a replica: connects to a MySQL server, says "oh hey, I'm a replica, please send me binary logs kthx".
40
+
`gh-ost` impersonates as a replica: it connects to a MySQL server, says "oh hey, I'm a replica, please send me binary logs kthx".
38
41
39
42
THE FINE PRINT:
40
43
41
-
-`SHOW SLAVE HOSTS` or `SHOW PROCESSLIST` will list down this strange "replica" that you can't really connect to.
44
+
-`SHOW SLAVE HOSTS` or `SHOW PROCESSLIST` will list this strange "replica" that you can't really connect to.
0 commit comments