PostgreSQL single server to flexible server migration error - permission denied for admin user

Nowakowski Krzysztof 21 Reputation points
2022-11-04T16:03:06.997+00:00

When I am doing migration of 3 databses(schemas), between single server and flexible server postgresql I am getting error shown below

Data migration could not be started for one or more of the DBSets. Error details: PGv2RestoreError: PG Restore failed for database 'postgres' with exit code '1' and error message 'error: could not execute query: ERROR: permission denied to create "pg_catalog.hypopg_list_indexes"'.   

It clearly says that problem lies with hypopg extension (which is enabled on both single and flexible server) which needs to create something in pg_catalog, but as admin user I don't have right to create there therefore operation isn't possible. Also this operation needs superuser and I am unable to get it as documentation states.

Also as preparation I am performing every step in this guides:
https://video2.skills-academy.com/en-us/azure/postgresql/migrate/how-to-migrate-single-to-flexible-portal
https://video2.skills-academy.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible
https://video2.skills-academy.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible#migration-prerequisites

Azure Database Migration service
Azure Database for PostgreSQL
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
507 questions
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,007 Reputation points Microsoft Employee
    2022-11-04T19:27:28.563+00:00

    @Nowakowski Krzysztof Please drop the hypopg extension on the source server before migration (for each DB the extension was created in): and give it a try.
    DROP EXTENSION IF EXISTS hypopg;
    If needed, it could then be recreated after migration on the source:
    CREATE EXTENSION hypopg;

    Regards
    Geetha


1 additional answer

Sort by: Most helpful
  1. devopsfj 196 Reputation points
    2023-11-03T13:45:31.37+00:00

    Did you get a solution to this?

    I am facing the same issue now.

    0 comments No comments