In this blog post from GOV.UK, the author explains the process of migrating their PostgreSQL database with minimal downtime. They discuss the importance of minimizing downtime as GOV.UK Notify sends millions of important notifications each day that require accessing the database. The author mentions using AWS Database Migration Service (DMS) to transfer data from the source database to the target database, with replication ensuring that the two databases stay in sync. They also describe the steps taken to prepare for the migration, including stopping traffic to the source database and checking replication. The migration process resulted in only 11 seconds of downtime, exceeding their target of 5 minutes. The author concludes by mentioning that the next step is to migrate their apps to AWS Elastic Container Service (ECS).
https://gds.blog.gov.uk/2024/01/17/how-we-migrated-our-postgresql-database-with-11-seconds-downtime/