Help Center/ Relational Database Service_RDS for PostgreSQL/ FAQs/ Database Permission/ What Should I Do If a Role Fails to Be Deleted from an RDS for PostgreSQL Instance?
Updated on 2026-10-08 GMT+08:00

What Should I Do If a Role Fails to Be Deleted from an RDS for PostgreSQL Instance?

Symptom

Role test failed to be deleted from an RDS for PostgreSQL instance by running the DROP ROLE test; command on the DAS console.

Possible Causes

A role usually fails to be deleted because other objects depend on it. To delete the role, you must revoke the privileges on other objects owned by this role.

Solution

  1. Check the privileges of the role.

    select * from INFORMATION_SCHEMA.role_table_grants WHERE grantee='test';

  2. To delete the role test, revoke its privileges first and then delete it.

    REVOKE ALL PRIVILEGES ON mytable FROM test;

    DROP ROLE test;