Error While Migrating from Azure PostgreSQL Single Server to Flexible Server
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
- Verified that I am using the Azure Database Migration Service.
- Confirmed that the user role in use is
azure_pg_admin
, as superuser access is not available. - Attempted to troubleshoot the issue by reviewing documentation and forums but could not resolve it.
Questions
- Is there a known workaround for resolving permission issues related to the
pg_replication_origin_oid
function during migration? - Could this be a limitation of the Azure Database for PostgreSQL Flexible Server’s permission model?
- 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!