Google Professional Cloud Database Engineer

Google Professional Cloud Database Engineer

Get started today

Ultimate access to all questions.


How can you test the high availability of your Cloud SQL for PostgreSQL instance in Google Cloud by performing a failover using the gcloud command?




Explanation:

To test the high availability of your Cloud SQL for PostgreSQL instance by performing a failover, you should use the gcloud sql instances promote-replica command on the replica instance. This command promotes the replica to be the new primary instance, effectively performing a failover. The correct usage is gcloud sql instances promote-replica <ReplicaInstanceName>, which corresponds to option D. Option A and B are incorrect because the failover command is not used in this context for Cloud SQL. Option C is incorrect because you should specify the replica instance name, not the primary instance name, when promoting a replica.