Courseiva
Question 32 of 1,446
Plan and manage database infrastructuremediumMultiple ChoiceObjective-mapped

PostgreSQL to Cloud SQL Migration: Minimal Downtime with DMS

A company is migrating an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and has a high write workload. They need minimal downtime. Which migration approach is best?

Quick Answer

The answer is Database Migration Service with continuous replication. This is the correct choice because DMS uses change data capture (CDC) to replicate ongoing writes from the source PostgreSQL database to Cloud SQL while the initial 2 TB full load completes, enabling a cutover with only seconds of downtime even under a high write workload. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of migration strategies for large, active databases—the key trap is choosing a batch export/import method like pg_dump, which would cause hours of downtime and cannot handle continuous writes. Remember the memory tip: "CDC for CDC" — Continuous Data Capture for Continuous Database Changes.

⚠ Common exam trap

Google Cloud often tests the misconception that pg_dump/psql is suitable for large databases with high write workloads, but the trap here is that candidates overlook the need for minimal downtime and the fact that logical dumps require a consistent snapshot, which forces a read-only period or long-running transaction that blocks writes.

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 with continuous replication

Database Migration Service (DMS) with continuous replication is the best approach because it supports minimal-downtime migrations from on-premises PostgreSQL to Cloud SQL. DMS uses change data capture (CDC) to replicate ongoing writes while the initial data load completes, then performs a cutover with only seconds of downtime. This handles the 2 TB size and high write workload without requiring manual export/import or schema changes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use Cloud Spanner

    Why it's wrong here

    Cloud Spanner is a different database type; migration would require significant application changes.

  • Use Cloud SQL for MySQL instead

    Why it's wrong here

    MySQL is not compatible with PostgreSQL schema and queries.

  • Export using pg_dump and import via psql

    Why it's wrong here

    Export/import requires application downtime and is slow for 2 TB.

  • Use Database Migration Service with continuous replication

    Why this is correct

    DMS with continuous replication minimizes downtime by keeping the target in sync.

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way 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 plans to migrate an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB in size and requires minimal downtime. Which migration approach should they use?

easy
  • A.Export the database using pg_dump and import into Cloud SQL using psql.
  • B.Use Datastream to stream data into Cloud SQL.
  • C.Use Database Migration Service with a continuous migration job.
  • D.Copy the data files to Cloud Storage and use gcloud to load into Bigtable.

Why C: Database Migration Service (DMS) with a continuous migration job is the correct approach because it supports minimal-downtime migrations from on-premises PostgreSQL to Cloud SQL. DMS uses logical replication (via PostgreSQL's pgoutput plugin) to continuously sync changes from the source to the target, allowing a short cutover window. For a 2 TB database, this avoids the lengthy downtime required by a full dump-and-load method.

Last reviewed: Jun 30, 2026

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.

Loading comments…

Sign in to join the discussion.

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.