Re: BUG #6116: Not able to drop user if S/he has permission on tablespace

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: tushar <tushar(dot)qa(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6116: Not able to drop user if S/he has permission on tablespace
Date: 2011-07-20 19:55:02
Message-ID: 1311191541-sup-1840@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Excerpts from Robert Haas's message of mié jul 20 15:11:47 -0400 2011:

> The "DROP OWNED BY" command only drops objects that are owned by a
> user. It doesn't revoke privileges that user has granted: those
> aren't considered dropable objects. So technically speaking all of
> those commands are working just as expected.
>
> Nevertheless, I agree with you that the behavior here leaves a lot to
> be desired. Hunting down the privilege grant that is stopping you
> from dropping a user is pretty darn annoying. I am not sure what to
> do about that, though.

The message detail indicates what's the grant that needs to be revoked.
IIRC we discussed whether DROP OWNED should revoke privileges on
tablespaces and databases just like it does for regular (non shared)
objects, but that went nowhere and nothing got done about it.

I think the expectation is that a combination of DROP OWNED and REASSIGN
OWNED, when applied to sufficient databases, should be enough to let you
drop a user. With that in mind, fixing this bug should be
straightforward.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2011-07-21 03:20:54 Re: BUG #6119: Postgres ODBC Install.msi
Previous Message Robert Haas 2011-07-20 19:11:47 Re: BUG #6116: Not able to drop user if S/he has permission on tablespace