Google Cloud Professional Cloud Database Engineer — Question 141
You are the DBA of your organization. You provided a cloned instance from the production Cloud SQL for PostgreSQL database to the developers for testing purposes. After the creation of the clone, your developers notice missing data in one of the recently altered tables. What should you do to ensure that all data is included?
Answer options
- A. Take a back up of the production database, and restore it to another Cloud SQL for PostgreSQL instance. Provide access to the new instance to the developers.
- B. Check for missing roles and privileges in the cloned Cloud SQL instance. Grant missing privileges to the developers.
- C. Clone the current production database, and restore it to an earlier point-in-time (PITR). Provide access to the cloned instance to the developers.
- D. Dump the production database to a file. Modify the dumped file to ALTER TABLE to SET LOGGED on tables that were unlogged in production. Reload the data in the new Cloud SQL for PostgreSQL instance.
Correct answer: D
Explanation
The correct answer is D because modifying the dumped file to set the tables as logged ensures that all recent transactions are captured and retained in the new instance. Options A and C involve creating new instances without addressing the logged state of the tables, which may still lead to missing data. Option B focuses on privileges, which does not resolve the underlying issue of missing data in the database.