Backend · database migration

Migrating database schema

The application is briefly offline while we move tables to the new schema. No emails or jobs are lost — they queue and replay once we're done.

22.4M
rows in scope
13.7M + 12k/s
rows migrated
14
tables touched
~ 18m
eta remaining
Backup
Lock writes
3
Migrate rows
4
Reindex
5
Verify
6
Unlock
7
Resume
step 3 of 7 · row copy4.2M / 9.8M rows
Read-only mode active. New writes will be accepted shortly. The platform automatically retries any requests that received a 503 during this window — clients with their own retry logic can stand down.

Tables in this migration

orders
rows3.4M
statedone
order_items
rows8.1M
statedone
customers
rows1.2M
statedone
payments
rows2.7M / 4.4M
statecopying
refunds
rows0.4M / 0.9M
statecopying
audit_log
rows2.6M
statequeued
sessions
rows0.6M
statequeued
webhooks_out
rows0.1M
statequeued
addresses
rows1.4M
statequeued
04:12 — entered migration mode, replication paused
04:14 — backup verified: snap-2026-06-15-0412
04:18 — orders done in 4m02s · 14k rows/s
04:31 — order_items done in 13m11s · 10.2k rows/s
04:34 — customers done in 2m04s · 9.6k rows/s
04:34 — starting payments + refunds in parallel
04:48 — short delay on follower-b for 14s, recovered
04:52 — payments 61% · refunds 44%

Configuration

EnginePostgreSQL 16.3
Primary clusterdb-pri-eu-west-1
Followersdb-fol-a, db-fol-b, db-fol-c
Modeonline migration, read-only writes
Throttlingauto · target db cpu < 70%
Backup verified2026-06-15 04:14 UTC
Rollback planreset to snap + replay wal
Change referenceCHG-2026-06-1515
Bramwell Data Co. — Glasswright Parkupdated automatically every 30s