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/command-line-flags.md
+18-10Lines changed: 18 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
A more in-depth discussion of various `gh-ost` command line flags: implementation, implication, use cases.
4
4
5
+
### allow-master-master
6
+
7
+
See [`--assume-master-host`](#assume-master-host).
8
+
5
9
### allow-on-master
6
10
7
11
By default, `gh-ost` would like you to connect to a replica, from where it figures out the master by itself. This wiring is required should your master execute using `binlog_format=STATEMENT`.
@@ -14,20 +18,20 @@ When your migration issues a column rename (`change column old_name new_name ...
14
18
15
19
`gh-ost` will print out what it thinks the _rename_ implied, but will not issue the migration unless you provide with `--approve-renamed-columns`.
16
20
17
-
If you think `gh-ost` is mistaken and that there's actually no _rename_ involved, you may pass `--skip-renamed-columns` instead. This will cause `gh-ost` to disassociate the column values; data will not be copied between those columns.
21
+
If you think `gh-ost` is mistaken and that there's actually no _rename_ involved, you may pass [`--skip-renamed-columns`](#skip-renamed-columns) instead. This will cause `gh-ost` to disassociate the column values; data will not be copied between those columns.
18
22
19
23
### assume-master-host
20
24
21
25
`gh-ost` infers the identity of the master server by crawling up the replication topology. You may explicitly tell `gh-ost` the identity of the master host via `--assume-master-host=the.master.com`. This is useful in:
22
26
23
-
- master-master topologies (together with `--allow-master-master`), where `gh-ost` can arbitrarily pick one of the co-master and you prefer that it picks a specific one
24
-
-_tungsten replicator_ topologies (together with `--tungsten`), where `gh-ost` is unable to crawl and detect the master
27
+
- master-master topologies (together with [`--allow-master-master`](#allow-master-master)), where `gh-ost` can arbitrarily pick one of the co-masters and you prefer that it picks a specific one
28
+
-_tungsten replicator_ topologies (together with [`--tungsten`](#tungsten)), where `gh-ost` is unable to crawl and detect the master
25
29
26
30
### assume-rbr
27
31
28
32
If you happen to _know_ your servers use RBR (Row Based Replication, i.e. `binlog_format=ROW`), you may specify `--assume-rbr`. This skips a verification step where `gh-ost` would issue a `STOP SLAVE; START SLAVE`.
29
33
Skipping this step means `gh-ost` would not need the `SUPER` privilege in order to operate.
30
-
You may want to use this on Amazon RDS
34
+
You may want to use this on Amazon RDS.
31
35
32
36
### conf
33
37
@@ -41,7 +45,7 @@ password=123456
41
45
42
46
### concurrent-rowcount
43
47
44
-
See [`exact-rowcount`](#exact-rowcount)
48
+
Defaults to `true`. See [`exact-rowcount`](#exact-rowcount)
45
49
46
50
### critical-load
47
51
@@ -88,8 +92,8 @@ A `gh-ost` execution need to copy whatever rows you have in your existing table
88
92
`gh-ost` also supports the `--exact-rowcount` flag. When this flag is given, two things happen:
89
93
- An initial, authoritative `select count(*) from your_table`.
90
94
This query may take a long time to complete, but is performed before we begin the massive operations.
91
-
When `--concurrent-rowcount` is also specified, this runs in parallel to row copy.
92
-
Note: `--concurrent-rowcount` now defaults to `true`.
95
+
When [`--concurrent-rowcount`](#concurrent-rowcount) is also specified, this runs in parallel to row copy.
96
+
Note: [`--concurrent-rowcount`](#concurrent-rowcount) now defaults to `true`.
93
97
- A continuous update to the estimate as we make progress applying events.
94
98
We heuristically update the number of rows based on the queries we process from the binlogs.
95
99
@@ -117,7 +121,7 @@ See [`initially-drop-ghost-table`](#initially-drop-ghost-table)
117
121
118
122
On a replication topology, this is perhaps the most important migration throttling factor: the maximum lag allowed for migration to work. If lag exceeds this value, migration throttles.
119
123
120
-
When using [Connect to replica, migrate on master](cheatsheet.md), this lag is primarily tested on the very replica `gh-ost` operates on. Lag is measured by checking the heartbeat events injected by `gh-ost` itself on the utility changelog table. That is, to measure this replica's lag, `gh-ost` doesn't need to issue `show slave status` nor have any external heartbeat mechanism.
124
+
When using [Connect to replica, migrate on master](cheatsheet.md#a-connect-to-replica-migrate-on-master), this lag is primarily tested on the very replica `gh-ost` operates on. Lag is measured by checking the heartbeat events injected by `gh-ost` itself on the utility changelog table. That is, to measure this replica's lag, `gh-ost` doesn't need to issue `show slave status` nor have any external heartbeat mechanism.
121
125
122
126
When [`--throttle-control-replicas`](#throttle-control-replicas) is provided, throttling also considers lag on specified hosts. Lag measurements on listed hosts is done by querying `gh-ost`'s _changelog_ table, where `gh-ost` injects a heartbeat.
123
127
@@ -140,10 +144,10 @@ With this flag set, the migration will cut-over upon deletion of the file or upo
140
144
### replica-server-id
141
145
142
146
Defaults to 99999. If you run multiple migrations then you must provide a different, unique `--replica-server-id` for each `gh-ost` process.
143
-
Optionally involve the process ID, for example: `--replica-server-id`=$((1000000000+$$))
147
+
Optionally involve the process ID, for example: `--replica-server-id=$((1000000000+$$))`.
144
148
145
149
It's on you to choose a number that does not collide with another `gh-ost` or another running replica.
146
-
See also: [`cheatsheet concurrent-migrations`](cheatsheet.md#concurrent-migrations)
150
+
See also: [`concurrent-migrations`](cheatsheet.md#concurrent-migrations) on the cheatsheet.
147
151
148
152
### skip-foreign-key-checks
149
153
@@ -168,3 +172,7 @@ Provide a HTTP endpoint; `gh-ost` will issue `HEAD` requests on given URL and th
168
172
### timestamp-old-table
169
173
170
174
Makes the _old_ table include a timestamp value. The _old_ table is what the original table is renamed to at the end of a successful migration. For example, if the table is `gh_ost_test`, then the _old_ table would normally be `_gh_ost_test_del`. With `--timestamp-old-table` it would be, for example, `_gh_ost_test_20170221103147_del`.
175
+
176
+
### tungsten
177
+
178
+
See [`tungsten`](cheatsheet.md#tungsten) on the cheatsheet.
0 commit comments