Skip to content

Commit 306a7e1

Browse files
Merge pull request #280451 from shriram-muthukrishnan/userrolesupdatebranch
Adding a note to perform mitigation steps for all databases included …
2 parents 5c8e255 + 2c701ef commit 306a7e1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

articles/postgresql/migrate/migration-service/concepts-user-roles-migration-service.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ Allowing unrestricted access to these system tables and views could lead to unau
5656

5757
### pg_pltemplate deprecation
5858

59-
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 undo these permissions before initiating the migration process.
59+
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.** If you're migrating to Flexible Server versions 13 and above and have granted permissions to users on the pg_pltemplate table on your single server, you mist revoke these permissions before initiating a new migration.
6060

6161
#### What is the impact?
62-
- If your application is designed to directly query the affected tables and views, it will encounter issues upon migrating to the flexible server. We strongly advise you to refactor your application to avoid direct queries to these system tables.
62+
- 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.
6363

64-
- If you have specifically granted or revoked privileges to any users or roles for the affected pg_catalog tables and views, you will encounter an error during the migration process. This error will be identified by the following pattern:
64+
- If you have 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. This error will be identified by the following pattern:
6565

6666
```sql
6767
pg_restore error: could not execute query <GRANT/REVOKE> <PRIVILEGES> on <affected TABLE/VIEWS> to <user>.
@@ -95,26 +95,27 @@ GROUP BY
9595

9696
**Step 2: Review the Output**
9797

98-
The output of the above query will show the list of privileges granted to roles on the impacted tables and views.
98+
The output of the query shows the list of privileges granted to roles on the impacted tables and views.
9999

100100
For example:
101-
102101
| Privileges | Relation name | Grantee |
103-
| :--- | :--- | :--- |
104-
| SELECT | pg_authid | adminuser1
105-
| SELECT, UPDATE | pg_shadow | adminuser2
102+
| :--- |:--- |:--- |
103+
| SELECT | pg_authid | adminuser1 |
104+
| SELECT, UPDATE |pg_shadow | adminuser2 |
106105

107106
**Step 3: Undo the privileges**
108107

109-
To undo the privileges, run REVOKE statements for each privilege on the relation from the grantee. In the above example, you would run:
108+
To undo the privileges, run REVOKE statements for each privilege on the relation from the grantee. In this example, you would run:
110109

111110
```sql
112111
REVOKE SELECT ON pg_authid FROM adminuser1;
113112
REVOKE SELECT ON pg_shadow FROM adminuser2;
114113
REVOKE UPDATE ON pg_shadow FROM adminuser2;
115114
```
115+
> [!NOTE]
116+
> Make sure you perform the above steps for all the databases included in the migration to avoid any permission-related issues during the migration..
116117
117-
After completing these steps, you can proceed to initiate a new migration from the single server to the flexible server using the migration service. You should not encounter permission-related issues during this process.
118+
After completing these steps, you can proceed to initiate a new migration from the single server to the flexible server using the migration service. You shouldn't encounter permission-related issues during this process.
118119

119120
## Related content
120121
- [Migration service](concepts-migration-service-postgresql.md)

0 commit comments

Comments
 (0)