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
> The migration of user roles, ownerships, and privileges feature is available only for the Azure Database for PostgreSQL - Single Server as the source. This feature is currently disabled for PostgreSQL version 16 servers.
17
+
> The migration of user roles, ownerships, and privileges feature is available only for the Azure Database for PostgreSQL - Single Server instance as the source. This feature is currently disabled for PostgreSQL version 16 servers.
18
18
19
19
The migration service automatically provides the following built-in capabilities for Azure Database for PostgreSQL - Single Server as the source and data migration:
20
20
21
21
- Migration of user roles on your source server to the target server.
22
22
- Migration of ownership of all the database objects on your source server to the target server.
23
-
- Migration of permissions of database objects on your source server, such as GRANTS/REVOKES, to the target server.
23
+
- Migration of permissions of database objects on your source server, such as `GRANT`/`REVOKE`, to the target server.
24
24
25
25
## Permission differences between Azure Database for PostgreSQL - Single Server and Flexible Server
26
26
@@ -68,9 +68,9 @@ Another important consideration is the deprecation of the **pg_pltemplate** syst
68
68
- If your application is designed to directly query the affected tables and views, it encounters issues upon migrating to the flexible server. We strongly advise you to refactor your application to avoid direct queries to these system tables.
69
69
- If you've granted or revoked privileges to any users or roles for the affected pg_catalog tables and views, you encounter an error during the migration process. You can identify this error by the following pattern:
70
70
71
-
```sql
72
-
pg_restore error: could not execute query <GRANT/REVOKE><PRIVILEGES>on<affected TABLE/VIEWS> to <user>.
73
-
```
71
+
```sql
72
+
pg_restore error: could not execute query <GRANT/REVOKE><PRIVILEGES>on<affected TABLE/VIEWS> to <user>.
73
+
```
74
74
75
75
#### Workaround
76
76
@@ -113,24 +113,21 @@ For example:
113
113
114
114
**Step 3: Undo the privileges**
115
115
116
-
To undo the privileges, run REVOKE statements for each privilege on the relation from the grantee. In this example, you would run:
116
+
To undo the privileges, run `REVOKE` statements for each privilege on the relation from the grantee. In this example, you would run:
117
117
118
118
```sql
119
119
REVOKESELECTON pg_authid FROM adminuser1;
120
120
REVOKESELECTON pg_shadow FROM adminuser2;
121
121
REVOKEUPDATEON pg_shadow FROM adminuser2;
122
122
```
123
123
124
-
**Step 4: Final Verification**
124
+
**Step 4: Final verification**
125
125
126
126
Run the query from step 1 again to ensure that the resulting output set is empty.
127
127
128
128
> [!NOTE]
129
129
> Make sure you perform the preceding steps for all the databases included in the migration to avoid any permission-related issues during the migration.
130
130
131
-
> [!NOTE]
132
-
> Make sure you perform the preceding steps for all the databases included in the migration to avoid any permission-related issues during the migration.
133
-
134
131
After you finish these steps, you can proceed to initiate a new migration from the single server to the flexible server by using the migration service. You shouldn't encounter permission-related issues during this process.
0 commit comments