nerdexam
Google

PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #54

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. Wha

The correct answer is A. Use gcloud sql instances failover <PrimaryInstanceName>.. To trigger a manual HA failover test on a Cloud SQL instance, you run gcloud sql instances failover <PrimaryInstanceName>. This command targets the PRIMARY instance and forces it to failover to the standby replica, simulating an outage and verifying that your HA configuration wor

Operating Database Solutions

Question

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?

Options

  • AUse gcloud sql instances failover <PrimaryInstanceName>.
  • BUse gcloud sql instances failover <ReplicaInstanceName>.
  • CUse gcloud sql instances promote-replica <PrimaryInstanceName>.
  • DUse gcloud sql instances promote-replica <ReplicaInstanceName>.

How the community answered

(44 responses)
  • A
    89% (39)
  • B
    2% (1)
  • C
    2% (1)
  • D
    7% (3)

Explanation

To trigger a manual HA failover test on a Cloud SQL instance, you run gcloud sql instances failover <PrimaryInstanceName>. This command targets the PRIMARY instance and forces it to failover to the standby replica, simulating an outage and verifying that your HA configuration works. Using the replica instance name (B) is incorrect because the failover command acts on the primary. promote-replica (C and D) is a completely different operation used to permanently promote a read replica into a standalone primary instance - it is not used for HA testing and is not reversible.

Topics

#Cloud SQL#High Availability#gcloud CLI#Failover

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DATABASE-ENGINEER Practice