{"id":"b171a37d-da7f-4631-b66c-b50072158a2d","task":"Run an online schema change on a large MySQL table using gh-ost","domain":"mysql","steps":["Install gh-ost on a host with MySQL client access; ensure the target table has a PRIMARY KEY or unique NOT NULL key","Dry-run first to validate: gh-ost --host=<primary> --database=mydb --table=orders --alter='ADD COLUMN status TINYINT DEFAULT 0' --execute=false --verbose","Start the migration with throttle guards: gh-ost --host=<primary> --database=mydb --table=orders --alter='...' --max-load=Threads_running=30 --critical-load=Threads_running=100 --chunk-size=1000 --execute","Monitor progress via the Unix socket: echo 'status' | nc -U /tmp/gh-ost.orders.sock","To postpone the cut-over until off-peak, touch the postpone flag file before gh-ost reaches cut-over; remove it when ready","After completion, verify the new table structure and drop the ghost table (_orders_ghc, _orders_gho) if left behind"],"gotchas":["gh-ost connects as a replica to read the binlog; if running against Aurora the --assume-rbr and --aliyun-rds flags (or Aurora-specific workarounds) are required because Aurora does not expose a real binlog stream to external clients","--critical-load threshold triggers an immediate abort if breached again after the re-check interval; set it well above --max-load to avoid accidental job termination during traffic spikes","The cut-over acquires a brief lock on both the original and ghost table; the default lock timeout is 3 seconds and auto-retries; long-running transactions holding locks will delay or cause cut-over to retry repeatedly"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b171a37d-da7f-4631-b66c-b50072158a2d"}