Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uydFn-00Af4a-25 for pgsql-admin@arkaria.postgresql.org; Tue, 16 Sep 2025 21:30:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uydFk-002f3m-Sm for pgsql-admin@arkaria.postgresql.org; Tue, 16 Sep 2025 21:30:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uydFk-002f3d-FJ for pgsql-admin@lists.postgresql.org; Tue, 16 Sep 2025 21:30:21 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uydFh-001CC4-0J for pgsql-admin@lists.postgresql.org; Tue, 16 Sep 2025 21:30:20 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-71d71bcab6fso53847147b3.0 for ; Tue, 16 Sep 2025 14:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758058216; x=1758663016; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aB74Lt3jiIt56Oe0rRZ4negrGlS5uWaN7nt/sTg7ZTA=; b=RFJPYjRN3xqIDdBYHe/torZlKvWjd1KZWg9ewwhrrmkbBLTWLIAFqmSvIhJ6rCg3lz 56aaidNqlTvruDhkhXswqf3L2+dDst0eIjhRHIU5ZlEtxlKF/b2ugP6SOYvljFUdAvFo QZJ8LX848S2AQSzgfRffUV9cRLJBakwpoB4/F4QV49kGkr8EVrGaAPDU7wNzfAL+ed/d kzcllosFbz8+Jansh0c5fCG8VSlgkB55sjA0ARDYtkcia72/MafNlRPgRfvjxrmUGgsI YeZWIha88kVX+MvQh7e0hkI9ne8b586Lx2G93PbmJ59pUOzlSOsgIQlLxsrbqpN4Wk9u x6zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758058216; x=1758663016; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aB74Lt3jiIt56Oe0rRZ4negrGlS5uWaN7nt/sTg7ZTA=; b=DTCXkfXeQWRaHCAqlB38c54+z0XlZudheSe5L2OSKqECJRiv40O7sWjD9W1Ohu62tZ I2j8Y2kkkkApkrMu+lVu0zJD/RkjIC+ieF95Kp9HdqTOuwkNfX8IBM+MEF8loUCI5HVk /vMpbNUIGmXgqSaw28BLFSr7V6kXeJrYX51ZZfkDiqETXYuVBivc/zyMvua1KHlWkzsI 4PHacr63EVBIA0oIuCP1f1I1AdKsxYYGAorMybaZXhaB+2z3galCqQWtdVR/lL4ZKc1l wQasWTFuwXLG6t21WfXET1sD0p5v4gdezVHBrCgBDG7PhjTMtcYP2U/9eiBlYRpwuSUJ i9YA== X-Forwarded-Encrypted: i=1; AJvYcCVgTDdo+MtQXlYjf7q8MTcNg5/exjilyzjjuJravHNLR3gcaGLpPRlfXUVVZikY6spewCZ5+4E9FeXhiQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YyiL5Wki4ZH+oNvXkvjkvPFkRS/yqFW51GLBaPyCO3th1+Rylhg vmdsGNpKfkqPxtzsx8bkE7z7ihwbCOShuC9pajhcw29LeTreo+m1EPiEeRNqd6xOQ+06GADQnG2 rA/BunIRk27m6YnGKFR2xRsCdvn/nUAQ= X-Gm-Gg: ASbGncs32ddDIyHRi7n8dzo80C/vcHAEz4IQupcopglvAfiK5prShMNPRmYXjQ+N/+F LRb1KakDQvNh6r6kTm87TX+0diNHlvbkEalLtaz27SYpRpvefcXeLVFjKCyzZYXjQPRmfxhhMN+ s5c/O38156ss40ZVHSixy3RnutXGbwrjRrxxTYAV2tC9OZexACgjtVAvyb8mNcIuCd68l8EgsGz fJS5HZh1y7OO7UOIIjl1kfxqwtKtOTCwx1SzA== X-Google-Smtp-Source: AGHT+IEY/RUnDrpvzMZGOrEDzzer3R8k8iVWRFysD+8EwEFoM1JGSH9xedXH34FWIElENsAiG56DCFL+17BaMHHiROA= X-Received: by 2002:a05:690c:d1e:b0:721:369e:44fd with SMTP id 00721157ae682-73065ab6c76mr162969597b3.45.1758058216302; Tue, 16 Sep 2025 14:30:16 -0700 (PDT) MIME-Version: 1.0 References: <1395876.1758058025@sss.pgh.pa.us> In-Reply-To: <1395876.1758058025@sss.pgh.pa.us> From: Naveen Kumar Date: Wed, 17 Sep 2025 03:00:05 +0530 X-Gm-Features: AS18NWCMBx9kFB7Bih0Wnl6lrtxykya8VD3ZlFqWDzfxKyOwzg4tHmYiO4w4KiM Message-ID: Subject: Re: dropuser error To: Tom Lane Cc: Sam Stearns , Pgsql-admin , Henry Ashu , Julie Mather Content-Type: multipart/alternative; boundary="0000000000007a2d3c063ef1d3a1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007a2d3c063ef1d3a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFAM Tom Lane wrote: > Sam Stearns 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 > > > --0000000000007a2d3c063ef1d3a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Check in csbtest DB for dependent objects. And= there might be default privileges=C2=A0set for that role.

Thanks & Regards,
=
Naveen Kumar .M,
Le= ad DBA
Mob= ile: 7755929449.



On Wed, Sep 17, 2025 at 2:57=E2=80= =AFAM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Sa= m Stearns <sam.= stearns@dat.com> writes:
> I'm trying to drop a user but getting the following error:

> dropuser: error: removal of role "dalec" failed: ERROR:=C2= =A0 role "dalec"
> cannot be dropped because some objects depend on it
> DETAIL:=C2=A0 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 databas= e
than the one you're connected to.=C2=A0 DROP USER knows that there
are some dependencies, but not much more.)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane


--0000000000007a2d3c063ef1d3a1--