Google Professional Cloud Database Engineer Question 191
Select 2Google Cloud PlatformYou are managing a Cloud SQL for PostgreSQL instance that supports a critical application. You receive an alert about the instance running out of disk space. To address the issue and avoid downtime, what steps should you take?
- A
Increase the disk size for the Cloud SQL instance using the Google Cloud Console or gcloud CLI.
- B
Restart the instance to immediately free up temporary storage and reclaim disk space.
- C
Enable automatic storage increases for the Cloud SQL instance.
- D
Delete old binary logs and unused data tables from the database.
- E
Upgrade the database engine to a newer version to optimize disk usage.
Show answer and explanation
Correct answers: A, C
Explanation
To address a disk space issue in Cloud SQL, the recommended approach is to either increase the disk size directly, which resolves the issue immediately, or enable automatic storage increases to prevent similar problems in the future. These actions are safe, effective, and align with best practices for database maintenance.
- A. Correct.
Increasing the disk size is a recommended and immediate solution for a Cloud SQL instance that is running out of disk space. This operation does not cause downtime.
- B. Incorrect.
Restarting the instance might temporarily reclaim some storage but is not a reliable or long-term solution for low disk space. It also introduces downtime.
- C. Correct.
Enabling automatic storage increases ensures that the instance can grow its disk size automatically when it reaches a threshold, preventing future space issues.
- D. Incorrect.
Deleting binary logs or unused data is a manual and risky operation that requires careful evaluation, as it may lead to data loss or application issues.
- E. Incorrect.
Upgrading the database engine is not directly related to resolving disk space issues and could introduce unnecessary complexity or downtime.