add / drop partitions in between before cutover
- Dominant language
- Go
- Stars
- 13.6k
- Forks
- 1.4k
- Avg merge
- 2h 31m
- Merged PRs (30d)
- 4
Description
while gh-ost is running to add index on partitioned table , can we truncate / add / drop partitions in between before cutover..? I tested truncate and data truncated from original and gh-ost table, but drop/add partitions worked on original table but not on gh-ost table, so will gh-ost fail during cutover due to different table definitions/partitions once it copies all rows of remaining partitions.? or is there a workaround to sqlbin_log off and then drop those partitions from gh-ost table to match the table definition before cutover..?
`gh-ost \--assume-master-host=$master \--tungsten \--max-load=Threads_running=75 \--critical-load=Threads_running=1000 \--critical-load-interval-millis=10000 \--critical-load-hibernate-seconds=300 \--chunk-size=1000 \--max-lag-millis=1000 \--conf=$FN \--host=$slave \--database="$database" \--table="mytable" \--verbose \--alter="ADD INDEX idx_testindex (test_id,test_description)" \--cut-over=default \--default-retries=120 \--panic-flag-file=/tmp/ghost.panic.flag \--postpone-cut-over-flag-file=/tmp/ghost.postpone.flag \--initially-drop-ghost-table \--initially-drop-old-table \--exact-rowcount \--cut-over-lock-timeout-seconds=10 \--hooks-path=/root/ghost_hooks/ \--switch-to-rbr \--execute`
Contributor guide
Assessment
This issue has not been assessed yet.