1

Attempting to migrate from AWS Aurora PostgreSQL 13.4 to Google Cloud SQL PostgreSQL 13. Migration job gives this error:

finished setup replication with errors: failed to drop database "postgres": generic::unknown: retry budget exhausted (10 attempts): pq: database "postgres" is being accessed by other users

The user the DMS is using only has SELECT permissions on the source database(Aurora)

I'm very confused as to why it is trying to drop the "postgres" database at all. Not sure if it is trying to drop the database in the source or destination. Not sure what I'm missing.

I've installed necessary extensions in the destination DB(pg_cron). No difference.

User in source database has SELECT on all tables/schemas outlined in the docs(including pglogical schema)

I've tried various PostgreSQL versions in the destination cluster( 13.x, 14.x). No difference.

The "Test connection" tool when creating the migration job, shows no errors. (There is a warning about a few tables not having Primary keys, but that's it.)

1 Answer 1

0

This appears to be a problem on Google Cloud SQL's end related specifically to pg_cron. The following workaround worked for me:

  1. Disable the pg_cron flag on the destination Cloud SQL instance
  2. Start the migration
  3. Once the migration completes, it will be in an error state with a message about pg_cron not being available. Despite that error, the migration has completed and replication is running
  4. Enable the pg_cron flag on the destination and reboot
  5. Setup your pg_cron jobs on the destination manually (they were not replicated)
  6. Promote the replica to master (if you want)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.