Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fliTU-0005Dn-CX for pgsql-general@arkaria.postgresql.org; Fri, 03 Aug 2018 22:23:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fliTS-0001hr-Qm for pgsql-general@arkaria.postgresql.org; Fri, 03 Aug 2018 22:23:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fliTS-0001hk-Io for pgsql-general@lists.postgresql.org; Fri, 03 Aug 2018 22:23:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fliTQ-0000aG-04 for pgsql-general@postgresql.org; Fri, 03 Aug 2018 22:23:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w73MMu9P007211; Fri, 3 Aug 2018 18:22:57 -0400 From: Tom Lane To: =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= cc: pgsql-general@postgresql.org Subject: Re: Eror while dropping a user In-reply-to: <00a801d42b6a$6cb81c80$46285580$@1nar.com.tr> References: <00a801d42b6a$6cb81c80$46285580$@1nar.com.tr> Comments: In-reply-to =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= message dated "Fri, 03 Aug 2018 23:41:58 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7209.1533334976.1@sss.pgh.pa.us> Date: Fri, 03 Aug 2018 18:22:56 -0400 Message-ID: <7210.1533334976@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= writes: > Using PostgreSQL 9.6.9 on Linux amd64 platform. > 2018-08-03 23:24:03.901 Drop user failed: SQL Error: ERROR: role > "pars.test" cannot be dropped because some objects depend on it > AYRINTI: 1 object in database postgres I see you've resolved your problem, but for future reference, note that you could have gotten a more detailed error message if you'd issued the DROP USER while connected to the postgres database. When the command is issued in database A, we can't see the details of what the user owns in database B, only that there is something over there :-( FWIW, I'm guessing that the issue was not object ownership per se, but permissions granted on some object owned by someone else. Those have to be revoked as well before a DROP USER will succeed. You might also care to read up on DROP OWNED BY. regards, tom lane