Error While Migrating from Azure PostgreSQL Single Server to Flexible Server

SoniaD_74 0 Reputation points
2024-11-29T14:29:23.0933333+00:00

Hi Community,

I’m encountering an issue while migrating from Azure PostgreSQL Single Server to Flexible Server using the Azure Database Migration Service.

Error Details

During the migration of a database (e.g., database_name), the process failed with the following error:

One or more errors occurred while migrating '***database_name***': pgcopydb failed with unknown errors. Please contact Microsoft support.    Logs from the migration:   2024-11-28 13:37:27.111 58 ERROR pgsql.c:2299 [TARGET 636] ERROR: permission denied for function pg_replication_origin_oid   2024-11-28 13:37:27.111 58 ERROR pgsql.c:2299 [TARGET 636] ERROR: permission denied for function pg_replication_origin_oid   2024-11-28 13:37:27.111 58 ERROR pgsql.c:2310 [TARGET 636] SQL query: select pg_replication_origin_oid($1)   2024-11-28 13:37:27.111 58 ERROR pgsql.c:2318 [TARGET 636] SQL params: 'azpgmigorigin_16517_20241128_133725'   2024-11-28 13:37:27.111 58 ERROR pgsql.c:4705 Failed to get replication origin oid for "azpgmigorigin_16517_20241128_133725"  

What I Was Doing

I followed the standard migration process for moving a database from Single Server to Flexible Server. However, the migration failed when attempting to access the pg_replication_origin_oid function.

Steps Taken So Far

  1. Verified that I am using the Azure Database Migration Service.
  2. Confirmed that the user role in use is azure_pg_admin, as superuser access is not available.
  3. Attempted to troubleshoot the issue by reviewing documentation and forums but could not resolve it.

Questions

  1. Is there a known workaround for resolving permission issues related to the pg_replication_origin_oid function during migration?
  2. Could this be a limitation of the Azure Database for PostgreSQL Flexible Server’s permission model?
  3. Are there additional steps I should take to bypass this error or tools to use?

Any guidance or suggestions would be greatly appreciated. If anyone from Microsoft has insights into this issue, your input would be incredibly helpful!

Thanks in advance for your help!

Azure Database Migration service
Azure Database for PostgreSQL
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.