You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/migrate/migration-service/concepts-user-roles-migration-service.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The service automatically provides the following built-in capabilities for the A
25
25
## Permission differences between Azure Database for PostgreSQL Single server and Flexible server
26
26
This section explores the differences in permissions granted to the **azure_pg_admin** role across single server and flexible server environments.
27
27
28
-
### PG Catalog permissions
28
+
### PG catalog permissions
29
29
Unlike user-created schemas, which organize database objects into logical groups, pg_catalog is a system schema. It houses crucial system-level information, such as details about tables, columns, and other internal bookkeeping data. Essentially, it’s where PostgreSQL stores important metadata.
30
30
31
31
In a single server environment, a user belonging to the azure_pg_admin role is granted select privileges for all pg_catalog tables and views. However, in a flexible server, we restricted privileges for certain tables and views, allowing only the super user to query them.
@@ -57,20 +57,20 @@ Allowing unrestricted access to these system tables and views could lead to unau
57
57
58
58
- If you have granted privileges to any users or roles for the affected pg_catalog tables and views, you encounter an error during the migration process. This error will be identified by the following pattern: **"pg_restore error: could not execute query GRANT/REVOKE PRIVILEGES on TABLENAME to username."**
59
59
To resolve this error, it's necessary to revoke the select privileges granted to various users and roles on the pg_catalog tables and views. You can accomplish this by taking the following steps.
60
-
-**Step1:** Take a pg_dump of the database containing only the schema by executing the following command from a machine with access to your single server.
60
+
1. Take a pg_dump of the database containing only the schema by executing the following command from a machine with access to your single server.
- **Step2:** Search for**GRANT** statements associated with the impacted tables and viewsin the dump file. These GRANT statements follow this format.
64
+
2. Search for**GRANT** statements associated with the impacted tables and viewsin the dump file. These GRANT statements follow this format.
65
65
```bash
66
66
GRANT <privileges> to pg_catalog.<impacted tablename/viewname> to <username>;
67
67
```
68
-
- **Step3:** If any such statements exist, ensure to execute the following command on your single server for each GRANT statement.
68
+
3. If any such statements exist, ensure to execute the following command on your single server for each GRANT statement.
69
69
```bash
70
70
REVOKE <privileges> to pg_catalog.<impacted tablename/viewname> from <username>;
71
71
```
72
72
73
-
##### Understanding pg_pltemplate Deprecation
73
+
##### Understanding pg_pltemplate deprecation
74
74
Another important consideration is the deprecation of the **pg_pltemplate** system table within the pg_catalog schema by the PostgreSQL community **starting from version 13.** Therefore, if you're migrating to Flexible Server versions 13 and above, and if you have granted permissions to users on the pg_pltemplate table, it is necessary to revoke these permissions before initiating the migration process. You can follow the same steps outlined above and conduct a search for **pg_pltemplate** in Step 2. Failure to do so leads to a failed migration.
75
75
76
76
After completing these steps, you can proceed to initiate a new migration from the single server to the flexible server using the migration tool. You're expected not to encounter permission-related issues during this process.
0 commit comments