- A
Export the database using pg_dump and import into Cloud SQL using pg_restore during a maintenance window.
Why wrong: This approach causes significant downtime and is not optimal for minimal downtime migration.
- B
Set up PostgreSQL on Compute Engine and replicate data, then switch over to Cloud SQL.
Why wrong: This adds unnecessary complexity and does not directly migrate to Cloud SQL.
- C
Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
Database Migration Service supports minimal-downtime migrations using continuous replication.
- D
Use Cloud SQL's built-in replication feature to connect directly to the on-premises database.
Why wrong: Cloud SQL does not support direct replication from on-premises sources.
Quick Answer
The answer is to use Database Migration Service with continuous replication for a homogeneous migration to Cloud SQL with minimal downtime. This is correct because DMS leverages PostgreSQL’s native logical replication or pglogical to keep the on-premises source database fully operational while changes stream continuously to Cloud SQL, allowing the final cutover to complete in seconds or minutes regardless of the 2 TB size. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of DMS’s continuous replication capability versus offline dump-and-load methods, which would cause unacceptable downtime for large databases. A common trap is choosing a one-time export/import approach, but the key is recognizing that DMS’s ongoing sync eliminates the need for a long maintenance window. Memory tip: think “DMS = Data Mirrors Sync” to remember that continuous replication keeps source and target aligned until cutover.
PCDE Plan and manage database infrastructure Practice Question
This PCDE practice question tests your understanding of plan and manage database infrastructure. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company is migrating an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and must have minimal downtime during migration. Which migration strategy should the Database Engineer recommend?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
Option C is correct because the Database Migration Service (DMS) supports continuous replication from an on-premises PostgreSQL database to Cloud SQL using logical replication (pglogical or native PostgreSQL logical replication). This allows the source database to remain operational during the migration, and the cutover to Cloud SQL can be performed with minimal downtime, typically seconds to minutes, meeting the 2 TB size and low-downtime requirements.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Export the database using pg_dump and import into Cloud SQL using pg_restore during a maintenance window.
Why it's wrong here
This approach causes significant downtime and is not optimal for minimal downtime migration.
- ✗
Set up PostgreSQL on Compute Engine and replicate data, then switch over to Cloud SQL.
Why it's wrong here
This adds unnecessary complexity and does not directly migrate to Cloud SQL.
- ✓
Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
Why this is correct
Database Migration Service supports minimal-downtime migrations using continuous replication.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Use Cloud SQL's built-in replication feature to connect directly to the on-premises database.
Why it's wrong here
Cloud SQL does not support direct replication from on-premises sources.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Google Cloud often tests the distinction between tools that require downtime (like pg_dump/pg_restore) and services that support continuous replication (like DMS), and the trap here is that candidates may assume Cloud SQL's built-in replication can connect to any external database, when in fact it is limited to inter-instance replication within Google Cloud.
Detailed technical explanation
How to think about this question
Database Migration Service uses PostgreSQL logical replication slots and the pgoutput plugin to stream changes in real time from the source to the target Cloud SQL instance. During the initial load, DMS performs a consistent snapshot using pg_dump with the --snapshot option, then applies the WAL (Write-Ahead Log) changes via replication slots. A subtle behavior is that the source database must have the `wal_level` set to `logical` and `max_replication_slots` configured appropriately; failure to do so can cause replication lag or slot exhaustion, especially with a 2 TB database where the initial sync may take hours.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Plan and manage database infrastructure — study guide chapter
Learn the concepts, then practise the questions
- →
Plan and manage database infrastructure practice questions
Targeted practice on this topic area only
- →
All PCDE questions
503 questions across all exam domains
- →
Google Professional Cloud Database Engineer study guide
Full concept coverage aligned to exam objectives
- →
PCDE practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related PCDE practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Plan and manage database infrastructure practice questions
Practise PCDE questions linked to Plan and manage database infrastructure.
Define data structures and implement SQL for Business Intelligence practice questions
Practise PCDE questions linked to Define data structures and implement SQL for Business Intelligence.
Design and implement database schemas practice questions
Practise PCDE questions linked to Design and implement database schemas.
Monitor and optimize database performance practice questions
Practise PCDE questions linked to Monitor and optimize database performance.
PCDE fundamentals practice questions
Practise PCDE questions linked to PCDE fundamentals.
PCDE scenario practice questions
Practise PCDE questions linked to PCDE scenario.
PCDE troubleshooting practice questions
Practise PCDE questions linked to PCDE troubleshooting.
Practice this exam
Start a free PCDE practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this PCDE question test?
Plan and manage database infrastructure — This question tests Plan and manage database infrastructure — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover. — Option C is correct because the Database Migration Service (DMS) supports continuous replication from an on-premises PostgreSQL database to Cloud SQL using logical replication (pglogical or native PostgreSQL logical replication). This allows the source database to remain operational during the migration, and the cutover to Cloud SQL can be performed with minimal downtime, typically seconds to minutes, meeting the 2 TB size and low-downtime requirements.
What should I do if I get this PCDE question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on PCDE
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is migrating their on-premises MySQL database to Cloud SQL. The database is 500 GB and they have a 1 Gbps network connection. They want to minimize downtime. Which THREE steps should they take?
medium- ✓ A.Perform a test migration to validate the process.
- B.Export the database to a SQL file and import after the cutover.
- ✓ C.Test the application against the new Cloud SQL instance.
- ✓ D.Use Database Migration Service with continuous replication.
- E.Schedule a maintenance window for the cutover.
Why A: Option A is correct because performing a test migration validates the entire process, including schema compatibility, data integrity, and application connectivity, before the actual cutover. This reduces the risk of unexpected failures during the production migration, which is critical for minimizing downtime. A test migration also helps estimate the time required for the final cutover and allows for tuning of the Database Migration Service settings.
Variation 2. A company wants to migrate a 100 GB MySQL database to Cloud SQL with minimal application changes. Which migration tool should they use?
easy- A.mysqldump
- ✓ B.Database Migration Service
- C.BigQuery Data Transfer Service
- D.Storage Transfer Service
Why B: Database Migration Service (DMS) is the correct tool because it is designed specifically for migrating databases to Cloud SQL with minimal downtime and minimal application changes. DMS uses a combination of initial snapshot and continuous change data capture (CDC) to replicate the source MySQL database to Cloud SQL, allowing the application to point to the new database with only a connection string update.
Variation 3. A company is migrating an on-premises PostgreSQL database to Cloud SQL. They need to minimize downtime during migration. Which TWO steps should they take?
medium- ✓ A.Set up a read replica for switchover
- B.Use pg_dump and restore
- C.Enable automatic backups
- D.Configure a high-availability instance
- ✓ E.Use Database Migration Service with continuous replication
Why A: Option A (Database Migration Service with continuous replication) minimizes downtime by syncing changes in real time. Option C (Set up a read replica) allows a near-instantaneous cutover by promoting the replica. Option B (automatic backups) does not reduce downtime. Option D (pg_dump) involves downtime. Option E (HA instance) is for post-migration availability, not migration steps.
Variation 4. A company is migrating its on-premises PostgreSQL database to Cloud SQL for PostgreSQL. They want to minimize downtime during the migration. Which TWO actions should they take?
medium- A.Increase the disk size of the Cloud SQL instance before migration to improve performance.
- B.Use pg_dump to export the database and pg_restore to import into Cloud SQL.
- ✓ C.Set up a Cloud SQL read replica and promote it to the primary after migration.
- D.Decrease max_connections to reduce load during migration.
- ✓ E.Use Database Migration Service (DMS) with continuous replication from the source.
Why C: Option C is correct because setting up a Cloud SQL read replica from the source PostgreSQL database and then promoting it to primary allows for a controlled cutover with minimal downtime. The replica stays in sync with the source using PostgreSQL's native streaming replication, and promotion is a fast metadata operation that typically takes seconds, not minutes or hours.
Last reviewed: Jun 30, 2026
This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.