Why Did My RDS for PostgreSQL Migration Fail?
Symptom
An error is reported when user root uses DRS to migrate RDS for PostgreSQL database data. In this case, you need to switch to another account or grant permissions to the current account.
Possible Causes
The migration may have failed because user root may not have permissions to operate certain objects when migrating the database using DRS.
Solution
- Log in to the database as user root and run the following statements.
grant USAGE on schema public to root; grant SELECT,REFERENCES,TRIGGER on all tables in schema public to root; grant EXECUTE on ALL FUNCTIONS IN SCHEMA public to root;
- After the migration is complete, revoke the permissions.
revoke USAGE schema public from root; revoke SELECT,REFERENCES,TRIGGER on all tables in schema public from root; revoke EXECUTE on ALL FUNCTIONS IN SCHEMA public from root;
![](https://support.huaweicloud.com/intl/en-us/rds_faq/public_sys-resources/note_3.0-en-us.png)
You can run the commands to grant permissions as user root only when your database kernel version supports root privilege escalation. For details, see Privileges of the root User.
Database Permission FAQs
- Why Does the Root User Not Have the Super Permissions?
- What Are the Differences Between RDS ManageAccess and DAS Permissions?
- RDS for MySQL Built-in Accounts
- RDS for MariaDB Built-in Accounts
- Does RDS for MySQL Support Multiple Accounts?
- Can Multiple Users Log In to DAS at the Same Time? Will the Accounts Be Locked If I Enter Wrong Passwords Several Times in a Row?
- Why Did I Fail to Create an Object on the postgres Database as a Common User?
- What Should I Do If a Role Failed to Be Deleted from an RDS for PostgreSQL Instance?
- Why Did My RDS for PostgreSQL Migration Fail?
- How Do I Grant the REPLICATION Permission to an RDS for PostgreSQL Database User?
- Why Is An Error Reported When I Attempt to Change a Table Owner of My RDS for PostgreSQL Instance?
- How Are the Login Name Permissions of RDS for SQL Server 2017 Enterprise Edition Primary/Standby DB Instances Synchronized to Its Read Replicas?
- After a Primary Instance Account Is Deleted and Recreated on RDS for SQL Server, Will the Permissions Be Automatically Synchronized?
- How Do I View Authorized Databases After a Local Client Is Connected to a DB Instance?
- How Do I Create Accounts and Databases After Purchasing a DB Instance?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore