Paxos' 21TB Cutover

Paxos engineered a zero-downtime migration of a 21TB Postgres ledger to AWS Aurora with a 371ms cutover—achieved via partitioning, phased cutover, and heavy failover testing. It's a practical blueprint for high-availability migrations in finance and other 24/7 systems. (blockchain.news)

Paxos published the engineering deep-dive on March 23, 2026, authored by Tom Wu, laying out the exact sequence their team used for the migration. (paxos.com) The team built a partitioned parent table around the live table, added a CHECK constraint proving the existing rows’ time range, attached the existing table as the “history” partition, and created new time-range child partitions for incoming writes. (paxos.com) To avoid an unpredictable blocking attach, engineers used ADD CONSTRAINT... NOT VALID and ran VALIDATE CONSTRAINT as a separate phase, which performs the unavoidable full-table scan under a SHARE UPDATE EXCLUSIVE lock and prevents autovacuum on the target table during validation. (paxos.com) That validation scan took just over nine hours in practice, causing P95/P99 tail-latency growth as dead tuples accumulated, and an initial attempt failed because write spikes exceeded timeout thresholds. (blockchain.news) On the retry Paxos coordinated with market makers to pause trading briefly and relaxed timeout thresholds to complete validation with P50 latency largely stable while higher percentiles degraded during the scan window. (blockchain.news) Engineers also resolved a partitioning gotcha: their system had relied on a BEFORE INSERT trigger to set a server-side timestamp, and once that timestamp became the partition key they had to ensure the key was available up-front for Postgres to route inserts correctly. (paxos.com) Paxos highlighted a global-uniqueness constraint risk for ledgers—Postgres only enforces uniqueness across partitions if the unique constraint includes the partition key, a crucial requirement to prevent duplicate application of idempotency keys. (blockchain.news)

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.