Courseiva
Migrate data solutionsmediumMultiple ChoiceObjective-mapped

PCDE Migrate data solutions Practice Question

An engineer is migrating from on-premises PostgreSQL to Cloud SQL for PostgreSQL using pg_dump. Which flags should be used to avoid errors related to roles and privileges when importing into Cloud SQL?

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

--no-owner --no-acl

Cloud SQL does not allow superuser access; --no-owner and --no-acl prevent errors from missing roles or privileges.

Answer analysis

Option-by-option breakdown

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

  • --schema-only --no-data

    Why it's wrong here

    These flags only export schema, not addressing role issues.

  • --clean --if-exists

    Why it's wrong here

    These flags clean objects before import, but don't avoid role errors.

  • --inserts --column-inserts

    Why it's wrong here

    These control INSERT format, not ownership.

  • --no-owner --no-acl

    Why this is correct

    These flags skip owner and ACL settings that may not exist in Cloud SQL.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

About these practice questions

This PCDE question is part of Courseiva's 1,446-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 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. An engineer needs to migrate a PostgreSQL database to Cloud SQL. They have used pg_dump to create a dump file. Which flags should they use to avoid issues with ownership and ACLs, since Cloud SQL does not support those?

easy
  • A.--no-privileges --no-owner
  • B.--no-owner --clean
  • C.--no-acl --if-exists
  • D.--no-owner --no-acl

Why D: --no-owner and --no-acl prevent pg_dump from including ownership and ACL commands, which are not supported on Cloud SQL. --no-privileges is not a standard flag (use --no-acl). --clean drops objects before recreating, not recommended.

Variation 2. An engineer is performing a manual migration from PostgreSQL to Cloud SQL. They run pg_dump and want to import the dump into Cloud SQL. Which pg_dump flags are necessary to avoid errors related to ownership and ACLs?

easy
  • A.--no-owner and --no-acl
  • B.--format=custom and --compress=9
  • C.--schema-only and --data-only
  • D.--create and --clean

Why A: Cloud SQL does not allow setting ownership or ACLs; using --no-owner and --no-acl prevents errors during restore.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.