04 Cut over — instructor notes
Teaching steps, verification checks, and recovery guidance for module 04.
macOS terminal: Run workshop commands in Terminal using zsh or bash.
Allow 35 to 50 minutes. Use the learner module for commands.
Review the runbook before execution
Check that the runbook stops writes, verifies catch-up, resets sequences, repoints the application, verifies data, and removes the migration pipe. Record time when writes stop and when the first target write succeeds. Use the rollback-wrapped inserts in the learner page to demonstrate sequence failure and repair before restarting the writer.
Verify the cutover
- Check sequence values before writes resume. After inserts resume, values can advance.
- Confirm the writer commits on Managed Postgres with zero failed transactions.
- Confirm Grafana reads the target and all eight panels render.
- Compare counts and checksums for
customersandproducts. - Expect order counts to differ after target writes resume. Capture both outputs inside the window for an exact comparison.
- Delete the migration pipe while RDS is reachable and verify its slot is removed.
Common failures
| Symptom | Action |
|---|---|
| Duplicate primary key on insert | Stop the writer, reset target sequences, verify, and restart |
| Grafana connection error | Set SHOP_DB_HOST to the target host and port, then recreate Grafana |
| RDS rejects writes after an abort | Reset default_transaction_read_only before restarting the source writer |
| Reconciliation differs after writes resume | Apply the learner page's table-specific checks |
End checkpoint
Confirm successful target writes, reconciliation, slot cleanup, and recorded downtime. Update the runbook with verification results and any missing steps before module 05.