You want to migrate your on-premises PostgreSQL database to Compute Engine. You need to migrate this database with the minimum downtime possible. What should you do?
A.
Perform a full backup of your on-premises PostgreSQL, and then, in the migration window, perform an incremental backup.
B.
Create a read replica on Cloud SQL, and then promote it to a read/write standalone instance.
C.
Use Database Migration Service to migrate your database.
D.
Create a hot standby on Compute Engine, and use PgBouncer to switch over the connections.
D.
A does not represent the minimum downtime. Read replicas in Cloud SQL depend upon a primary instance also in Cloud SQL. We’re talking about migrating to GCE, so B is wrong. The Database Migration Service migrates PostgreSQL to Cloud SQL or AlloyDB for PostgreSQL (Preview as of 3/16/23 which means it won’t be on the exam - yet). That makes C wrong. That leaves D. Pgbouncer is a connection pooler used to minimize application downtime.
https://cloud.google.com/architecture/migrating-postgresql-to-gcp
D
PgBouncer maintains a pool for connections for each database and user combination. PgBouncer either creates a new database connection for a client or reuses an existing connection for the same user and database.
+
PgBouncer is a simple PostgreSQL connection pool that allows for several thousand connections at a time. Using Kubernetes Engine to run a Helm Chart w/ PgBouncer based on the great article from futuretech-industries, we were able to set up an easily deployable system to get the most out of our CloudSQL DBs without breaking the bank.
https://medium.com/google-cloud/increasing-cloud-sql-postgresql-max-connections-w-pgbouncer-kubernetes-engine-49b0b2894820#:~:text=That%20is%20where,breaking%20the%20bank.
B - we're not talking CloudSQL here
C - you can only migrate PostgreSQL to CloudSQL for PostgreSQL or AlloyDB for PostgreSQL
A is kinda fine, but D is better
D: Create a hot standby on ***** Compute Engine, and use PgBouncer to switch over the connections.
To perform the migration, you shut down the current master and then promote the subordinate Google Cloud replica to master. PgBouncer reroutes traffic to the new master node on Google Cloud.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
887ad17
1 week, 2 days agodynamic_dba
4 months, 3 weeks agoAtnafu
7 months, 1 week agochelbsik
7 months, 2 weeks agopk349
7 months, 2 weeks ago