Re: dropuser error

From: Naveen Kumar <naveenchowdaryon(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sam Stearns <sam(dot)stearns(at)dat(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>, Henry Ashu <henry(dot)ashu(at)dat(dot)com>, Julie Mather <julie(dot)mather(at)dat(dot)com>
Subject: Re: dropuser error
Date: 2025-09-16 21:30:05
Message-ID: CADk76jpfQc23rr9FWwFy1MHr8PRBZA1qph+c0sPT7Y5AN+o5gg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Check in *csbtest *DB for dependent objects. And there might be default
privileges set for that role.

Thanks & Regards,
Naveen Kumar .M,
Lead DBA
Mobile: 7755929449.

On Wed, Sep 17, 2025 at 2:57 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Sam Stearns <sam(dot)stearns(at)dat(dot)com> writes:
> > I'm trying to drop a user but getting the following error:
>
> > dropuser: error: removal of role "dalec" failed: ERROR: role "dalec"
> > cannot be dropped because some objects depend on it
> > DETAIL: 262 objects in database csbtest
>
> If the display looks like that rather than itemizing the objects,
> it's because they are in a different database of the cluster.
> You need to connect to the "csbtest" database and then you can
> drop or reassign ownership of those objects.
>
> (The subtext here is that users/roles are shared across the
> whole cluster, but most object kinds are local to one database.
> You can't "see" the details of objects in a different database
> than the one you're connected to. DROP USER knows that there
> are some dependencies, but not much more.)
>
> regards, tom lane
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message 李明 2025-09-16 23:40:17 Re: Allow connections by IP address?
Previous Message Tom Lane 2025-09-16 21:27:05 Re: dropuser error