Symptoms
Drop database user Some_DB_User_Name on host XX.XX.XX.XX
task fails with the following output:
PgSQL API error: ERROR: role "Some_DB_User_Name" cannot be dropped because some objects depend on it
DETAIL: XXX objects in database Some_DB_Name
Cause
Mentioned database contains schema or role which is owned by existing user. This error is returned by PostgreSQL during attempt to drop the user. This case has been submitted to the Maintenance Team as feature request with id POA-90098: Error when dropping a database user when a user owns a schema or specific custom role
.
Resolution
The following workaround can be used to fix the task:
Remove the database manually:
postgres=# DROP DATABASE Some_DB_Name; DROP DATABASE
- Restart the failed task.