SQLSTATE 2BP01Severity lowLab verified

Incident brief

Dependent objects still exist

A DROP ROLE was attempted while that role still owned a table. PostgreSQL refused to drop the role rather than leave an object without a valid owner.

Reproduced on PostgreSQL 16.14Verified 2026-07-16 (Docker lab, PostgreSQL 16.14)Reviewed by Verified against PostgreSQL 16.14 in an isolated lab environment

In 10 seconds

What
Dependent objects still exist
What triggers it
Create a role, then make it the owner of a table.
The fix
Reassign ownership first: ALTER TABLE ... OWNER TO another_role, or use REASSIGN OWNED BY old_role TO new_role for everything at once.
Proof
Reproduced on PostgreSQL 16.14 → Dropping a role that still owned a table was rejected with SQLSTATE 2BP01, naming the exact dependent table in DETAIL.

The fix

What to do right now

The immediate, application-level response to this error.

  • Reassign ownership first: ALTER TABLE ... OWNER TO another_role, or use REASSIGN OWNED BY old_role TO new_role for everything at once.
  • Then DROP ROLE succeeds because nothing depends on it anymore.
Fix — SQL
REASSIGN OWNED BY batch7_owner TO postgres;
DROP ROLE batch7_owner;

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

PG 16.14
Last verified
2026-07-16 (Docker lab, PostgreSQL 16.14)
Reviewed by
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed