Skip to content

Commit 0050665

Browse files
author
Shlomi Noach
committed
adding documentation
1 parent 5a5f43d commit 0050665

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/testing-on-replica.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,18 @@ You now have the time to verify the tool works correctly. You may checksum the e
4242
It's your job to:
4343
- Drop the ghost table (at your leisure, you should be aware that a `DROP` can be a lengthy operation)
4444
- Start replication back (via `START SLAVE`)
45+
46+
### Examples
47+
48+
Simple:
49+
```shell
50+
$ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --verbose --execute
51+
```
52+
53+
Elaborate:
54+
```shell
55+
$ gh-osc --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --switch-to-rbr --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --postpone-swap-tables-flag-file=/tmp/ghost-postpone.flag --exact-rowcount --allow-nullable-unique-key --verbose --execute
56+
```
57+
- Count exact number of rows (makes ETA estimation very good). This goes at the expense of paying the time for issuing a `SELECT COUNT(*)` on your table. We use this lovingly.
58+
- Automatically switch to `RBR` if replica is configured as `SBR`. See also: [migrating with SBR](migrating-with-sbr.md)
59+
- allow iterating on a `UNIQUE KEY` that has `NULL`able columns (at your own risk)

0 commit comments

Comments
 (0)