← All posts

Managing Schema Migrations in Distributed Databases at Scale

How to run zero-downtime schema upgrades and coordinate write paths across partitioned PostgreSQL databases.

Upgrading schemas on databases that serve high-traffic endpoints is risky. We explore using the expand-and-contract pattern to support multiple schema versions simultaneously.

We look at executing background data backfills, utilizing triggers to duplicate writes, and dynamically dropping old columns once client migration completes.