Zero-downtime schema change on Neon: splitting a users.name column without failed requests

A developer demonstrates how to split a single name column into first and last name columns in Postgres without downtime, using the expand-and-contract pattern. The test setup runs a small orders API across two instances behind a health-checked proxy, with Postgres 18 hosted on Neon and seeded with 200,000 users and 100,000 orders. The migration is broken into six steps: adding nullable columns and a sync trigger, deploying dual writes, backfilling existing rows, enforcing constraints, switching reads, and finally dropping the old column. Each database step is rehearsed first on a disposable Neon copy-on-write branch to check its effects before running against production. Across the run, 319,568 requests were sent during the migration and none failed, with a load generator also checking that names were preserved, not just that responses returned success.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in