Snapshot‑Based Migration for PostgreSQL and Extensions
Traditional PostgreSQL migrations lean on logical replication or dump/restore, which can add hours of data copy time and operational risk at scale. In this talk, I’ll walk through a snapshot‑based migration approach we built to move PostgreSQL clusters between platforms while keeping the cutover window to just a few minutes. The core idea is simple: instead of copying table data, we re‑use the PostgreSQL data directory by creating storage snapshots, attaching the restored disks to a newly provisioned target cluster, and then running a focused “data adaptation” phase. The migration flow includes pre‑validation, a brief read‑only window on the source, restoring from snapshots, swapping the target data disk in as the primary data drive, applying platform “delta” files (extensions, configuration, certificates), and then bringing Postgres back up for verification and cutover. In our environment, migrations typically complete end‑to‑end in minutes, with the read‑only window averaging less than minutes, no matter the database size.
Volkan Cetin is a Senior Software Engineer on the Azure Cosmos DB for PostgreSQL team at Microsoft, where he has worked for four years on the managed service that runs Postgres and Citus clusters in production. Much of his work sits at the hard edges of moving live databases: version upgrades, cluster migrations, and the extension compatibility problems that tend to surface only at the worst moment. He previously worked at Turkish Aerospace and holds a Computer Engineering degree from Middle East Technical University.