Google Cloud Professional Cloud Database Engineer — Question 86

You are managing a Cloud SQL for PostgreSQL instance in Google Cloud. You need to test the high availability of your Cloud SQL instance by performing a failover. You want to use the cloud command. What should you do?

Answer options

Correct answer: A

Explanation

The correct command to initiate a failover for a primary instance is 'gcloud sql instances failover <PrimaryInstanceName>', making option A the right choice. Options B and C are incorrect because they either target the wrong instance type or promote a replica instead of performing a failover. Option D similarly promotes a replica, which does not address the failover requirement.