Google Cloud Professional Cloud Database Engineer — Question 59
You want to migrate your on-premises PostgreSQL database to Compute Engine. You need to migrate this database with the minimum downtime possible. What should you do?
Answer options
- A. Perform a full backup of your on-premises PostgreSQL, and then, in the migration window, perform an incremental backup.
- B. Create a read replica on Cloud SQL, and then promote it to a read/write standalone instance.
- C. Use Database Migration Service to migrate your database.
- D. Create a hot standby on Compute Engine, and use PgBouncer to switch over the connections.
Correct answer: D
Explanation
The correct answer is D, as creating a hot standby allows for seamless failover with minimal disruption. Option A involves a full and incremental backup, which can lead to longer downtime. Option B, while effective, may not be the most efficient method for immediate cutover. Option C, although a valid migration method, may not guarantee the least downtime compared to the hot standby approach.