Google Cloud Professional Cloud Database Engineer — Question 123
You want to migrate an on-premises mission-critical PostgreSQL database to Cloud SQL. The database must be able to withstand a zonal failure with less than five minutes of downtime and still not lose any transactions. You want to follow Google-recommended practices for the migration. What should you do?
Answer options
- A. Take nightly snapshots of the primary database instance, and restore them in a secondary zone.
- B. Build a change data capture (CDC) pipeline to read transactions from the primary instance, and replicate them to a secondary instance.
- C. Create a read replica in another region, and promote the read replica if a failure occurs.
- D. Enable high availability (HA) for the database to make it regional.
Correct answer: D
Explanation
The correct answer is D because enabling high availability (HA) ensures that the Cloud SQL instance can automatically handle regional failovers with minimal downtime and no data loss. Options A and C involve methods that do not guarantee immediate failover and may result in downtime or data loss. Option B, while useful for replication, does not fulfill the requirement for immediate availability during a zonal failure.