Hello Daniel Fajardo,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your PostgreSQL Database users lost permissions after azure migrated our server to azure database flexible server.
@Sai Raghunadh M, has given useful information about role migration in PostgreSQL, specifically related to the pg_catalog
schema. Let now troubleshoot specific instructions to restoring access with more detailed steps not just a general guide.
During the migration from your old PostgreSQL server to the new Azure Database for PostgreSQL Flexible Server, user permissions might not have migrated correctly, which is why you're experiencing access issues.
- Connect to the new flexible server using an admin account (such as the
azure_superuser
) and review the roles and privileges in the database. Execute the following query to list the roles and their privileges:
SELECT rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin
FROM pg_roles;
This will give you an idea of what roles currently exist and their permissions.
- If you find that the necessary roles are missing privileges, you may need to manually reassign permissions. For example, to grant a role the necessary privileges, you can use:
GRANT ALL PRIVILEGES ON DATABASE your_database TO your_user;
If your roles are not migrated, you might need to recreate them with the correct permissions.
- About the double billing, since both the old and new servers are still up, you may be charged for both servers. It’s important to stop or delete the old server once you've verified that all data and permissions have successfully migrated to the new flexible server.
- The documentation provided above by @Sai Raghunadh M, can help with understanding role migration and permissions management in Azure Database for PostgreSQL.
- If the issue persists, contact Azure Support from your Azure Portal with specific error code and information.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.