skip to Main Content

I am getting this error while performing migration between postgresql single server and flexible server:

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"'. 

Which quite clearly states that user which is performing migration dosen’t have right to perform some operations with creating extensio in pg_catalog. The problem is that in Azure i CAN NOT have superuser, so it seems like there is no way to perform this operation. Every step is done using azure platform and in compilance with guides below.
Also it looks like problem lies with hypopg extension, which is enabled on both databases.

guides:
https://learn.microsoft.com/en-us/azure/postgresql/migrate/how-to-migrate-single-to-flexible-portal
https://learn.microsoft.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible
https://learn.microsoft.com/en-us/azure/postgresql/migrate/concepts-single-to-flexible#migration-prerequisites

2

Answers


  1. For some reason, the HypoPG extension seems to have been installed in the pg_catalog schema. Move it to a different schema on the old database:

    ALTER EXTENSION hypopg SET SCHEMA public;
    
    Login or Signup to reply.
  2. 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;

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search