Prisma moves 74 GB control plane from RDS to Prisma Postgres with zero downtime
Brief
Prisma migrated its own production control plane from Amazon RDS to Prisma Postgres with no write pause, using logical replication and a one-week rollback window.
Migration scope
- 83 tables and 74 GB moved; the publication excluded _prisma_migrations, so 82 tables were copied.
- All tables reached ready the same day with zero errors.
- Target size was 79 GB because RDS used lz4 compression and Prisma Postgres used pglz.
Cutover and rollback
- Six services switched in one deployment; the last RDS write came 7 minutes after the merge.
- RDS subscribed back to Prisma Postgres with copy_data=false and origin=none for rollback.
- Rollback stayed available for a week; after final comparisons, Prisma dropped the reverse subscription and stopped RDS.
Lessons and incident
- Logical replication does not carry schema changes, so migrations had to run on both databases while the reverse stream was active.
- A CI job was pointed at the wrong database 52 minutes after cutover, adding three columns only on Prisma Postgres and stopping the reverse stream.
- About 15 minutes later, manual SQL on RDS restored the stream with no data lost.
Generated by AI from the original article. Check the source for full details.