
Answer-first summary for fast verification
Answer: Use gcloud sql instances promote-replica <ReplicaInstanceName>.
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.
Author: LeetQuiz Editorial Team
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?
A
Use gcloud sql instances failover <PrimaryInstanceName>.
B
Use gcloud sql instances failover <ReplicaInstanceName>.
C
Use gcloud sql instances promote-replica <PrimaryInstanceName>.
D
Use gcloud sql instances promote-replica <ReplicaInstanceName>.
No comments yet.