pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedUnable to drop role
11+ messages / 5 participants
[nested] [flat]
* Unable to drop role
@ 2010-08-23 17:29 McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-23 22:22 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 11+ messages in thread
From: McGehee, Robert @ 2010-08-23 17:29 UTC (permalink / raw)
To: pgsql-admin
PostgreSQL developers,
I am unable to drop a role with presumably no object dependencies or
connection access on my PostgreSQL 8.4.2 installation (64-bit OSX). Any
help would be greatly appreciated as I've spent way too much time trying
to execute a simple command.
template1=# DROP ROLE a485099;
ERROR: role "a485099" cannot be dropped because some objects depend on
it
DETAIL: access to database template1
template1=# \du a485099;
List of roles
Role name | Attributes | Member of
-----------+------------+-----------
a485099 | | {}
template1=# REVOKE CONNECT ON DATABASE template1 FROM a485099;
REVOKE
template1=# REASSIGN OWNED BY a485099 TO postgres;
REASSIGN OWNED
template1=# DROP OWNED BY a485099;
REASSIGN OWNED
template1=# DROP ROLE a485099;
ERROR: role "a485099" cannot be dropped because some objects depend on
it
DETAIL: access to database template1
What am I missing?
Thanks, Robert
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
@ 2010-08-23 22:22 ` Alvaro Herrera <alvherre@commandprompt.com>
1 sibling, 0 replies; 11+ messages in thread
From: Alvaro Herrera @ 2010-08-23 22:22 UTC (permalink / raw)
To: McGehee, Robert <robert.mcgehee@geodecapital.com>; +Cc: pgsql-admin
Excerpts from McGehee, Robert's message of lun ago 23 13:29:47 -0400 2010:
> PostgreSQL developers,
> I am unable to drop a role with presumably no object dependencies or
> connection access on my PostgreSQL 8.4.2 installation (64-bit OSX). Any
> help would be greatly appreciated as I've spent way too much time trying
> to execute a simple command.
>
>
> template1=# DROP ROLE a485099;
> ERROR: role "a485099" cannot be dropped because some objects depend on
> it
> DETAIL: access to database template1
So what does \l say about template1?
> template1=# REASSIGN OWNED BY a485099 TO postgres;
> template1=# DROP OWNED BY a485099;
IIRC neither REASSIGN OWNED nor DROP OWNED do anything about access to
databases.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
@ 2010-08-24 00:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
1 sibling, 1 reply; 11+ messages in thread
From: Tom Lane @ 2010-08-24 00:11 UTC (permalink / raw)
To: McGehee, Robert <Robert.McGehee@geodecapital.com>; +Cc: pgsql-admin
"McGehee, Robert" <Robert.McGehee@geodecapital.com> writes:
> template1=# DROP ROLE a485099;
> ERROR: role "a485099" cannot be dropped because some objects depend on it
> DETAIL: access to database template1
> template1=# REVOKE CONNECT ON DATABASE template1 FROM a485099;
> REVOKE
CONNECT is not the only possible privilege. Try REVOKE ALL.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-08-24 13:25 ` McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 11+ messages in thread
From: McGehee, Robert @ 2010-08-24 13:25 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@commandprompt.com>; +Cc: pgsql-admin
Thanks Tom and Alvaro for clearing up my confusion.
\l showed that a485099 had both (C)reate and (T)emporary access.
Revoking those allowed me to drop the role. Thanks for the help!
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, August 23, 2010 8:11 PM
To: McGehee, Robert
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Unable to drop role
"McGehee, Robert" <Robert.McGehee@geodecapital.com> writes:
> template1=# DROP ROLE a485099;
> ERROR: role "a485099" cannot be dropped because some objects depend
on it
> DETAIL: access to database template1
> template1=# REVOKE CONNECT ON DATABASE template1 FROM a485099;
> REVOKE
CONNECT is not the only possible privilege. Try REVOKE ALL.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
@ 2010-08-24 13:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:28 ` Re: Unable to drop role Alex Hunsaker <badalex@gmail.com>
2010-08-24 16:53 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 2 replies; 11+ messages in thread
From: Tom Lane @ 2010-08-24 13:36 UTC (permalink / raw)
To: McGehee, Robert <Robert.McGehee@geodecapital.com>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin
"McGehee, Robert" <Robert.McGehee@geodecapital.com> writes:
> Thanks Tom and Alvaro for clearing up my confusion.
> \l showed that a485099 had both (C)reate and (T)emporary access.
> Revoking those allowed me to drop the role. Thanks for the help!
I wonder whether Robert's confusion doesn't stem from a poor choice
of message wording:
>> template1=# DROP ROLE a485099;
>> ERROR: role "a485099" cannot be dropped because some objects depend on it
>> DETAIL: access to database template1
I can see how "access to" might be read as specifically meaning "CONNECT
privilege for". Should we change this message from "access to whatever"
to "privileges for whatever", or some such wording?
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-08-24 16:28 ` Alex Hunsaker <badalex@gmail.com>
1 sibling, 0 replies; 11+ messages in thread
From: Alex Hunsaker @ 2010-08-24 16:28 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: McGehee, Robert <Robert.McGehee@geodecapital.com>; Alvaro Herrera <alvherre@commandprompt.com>; pgsql-admin
On Tue, Aug 24, 2010 at 07:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I can see how "access to" might be read as specifically meaning "CONNECT
> privilege for". Should we change this message from "access to whatever"
> to "privileges for whatever", or some such wording?
+1, There have been a few times I found that message not very um helpful.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-08-24 16:53 ` Alvaro Herrera <alvherre@commandprompt.com>
2010-08-24 17:19 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-26 18:59 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 2 replies; 11+ messages in thread
From: Alvaro Herrera @ 2010-08-24 16:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: McGehee, Robert <robert.mcgehee@geodecapital.com>; pgsql-admin; pgsql-hackers@postgresql.org
Excerpts from Tom Lane's message of mar ago 24 09:36:05 -0400 2010:
> "McGehee, Robert" <Robert.McGehee@geodecapital.com> writes:
> > Thanks Tom and Alvaro for clearing up my confusion.
> > \l showed that a485099 had both (C)reate and (T)emporary access.
> > Revoking those allowed me to drop the role. Thanks for the help!
>
> I wonder whether Robert's confusion doesn't stem from a poor choice
> of message wording:
>
> >> template1=# DROP ROLE a485099;
> >> ERROR: role "a485099" cannot be dropped because some objects depend on it
> >> DETAIL: access to database template1
>
> I can see how "access to" might be read as specifically meaning "CONNECT
> privilege for". Should we change this message from "access to whatever"
> to "privileges for whatever", or some such wording?
Code is here:
else if (deptype == SHARED_DEPENDENCY_ACL)
appendStringInfo(descs, _("access to %s"), objdesc);
in StoreObjectDescription().
Happy to change it to whatever is deemed appropriate. "privileges for %s"
sounds good; I'll do that unless somebody comes up with a better idea
which outvotes this one.
Backpatch all the way to 8.1? Code doesn't exist prior to that.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:53 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
@ 2010-08-24 17:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 17:37 ` Re: [HACKERS] Unable to drop role Robert Haas <robertmhaas@gmail.com>
1 sibling, 1 reply; 11+ messages in thread
From: Tom Lane @ 2010-08-24 17:19 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: McGehee, Robert <robert.mcgehee@geodecapital.com>; pgsql-admin; pgsql-hackers@postgresql.org
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Happy to change it to whatever is deemed appropriate. "privileges for %s"
> sounds good; I'll do that unless somebody comes up with a better idea
> which outvotes this one.
> Backpatch all the way to 8.1? Code doesn't exist prior to that.
I'd vote for fixing it in HEAD and perhaps 9.0, but not earlier.
Changing this will cause problems for translators, and it doesn't
seem important enough to mess up stable-branch translations.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [HACKERS] Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:53 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
2010-08-24 17:19 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-08-24 17:37 ` Robert Haas <robertmhaas@gmail.com>
0 siblings, 0 replies; 11+ messages in thread
From: Robert Haas @ 2010-08-24 17:37 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; McGehee, Robert <robert.mcgehee@geodecapital.com>; pgsql-admin; pgsql-hackers@postgresql.org
On Tue, Aug 24, 2010 at 1:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Happy to change it to whatever is deemed appropriate. "privileges for %s"
>> sounds good; I'll do that unless somebody comes up with a better idea
>> which outvotes this one.
>
>> Backpatch all the way to 8.1? Code doesn't exist prior to that.
>
> I'd vote for fixing it in HEAD and perhaps 9.0, but not earlier.
> Changing this will cause problems for translators, and it doesn't
> seem important enough to mess up stable-branch translations.
+1.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:53 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
@ 2010-08-26 18:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-26 19:07 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
1 sibling, 1 reply; 11+ messages in thread
From: Tom Lane @ 2010-08-26 18:59 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: McGehee, Robert <robert.mcgehee@geodecapital.com>; pgsql-admin; pgsql-hackers@postgresql.org
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Code is here:
> else if (deptype == SHARED_DEPENDENCY_ACL)
> appendStringInfo(descs, _("access to %s"), objdesc);
> in StoreObjectDescription().
> Happy to change it to whatever is deemed appropriate. "privileges for %s"
> sounds good; I'll do that unless somebody comes up with a better idea
> which outvotes this one.
If you're not able to commit this in the next couple of hours, please
let me know and I'll do it. RC1 wraps tonight.
regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Unable to drop role
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 00:11 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` Re: Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:53 ` Re: Unable to drop role Alvaro Herrera <alvherre@commandprompt.com>
2010-08-26 18:59 ` Re: Unable to drop role Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-08-26 19:07 ` Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 0 replies; 11+ messages in thread
From: Alvaro Herrera @ 2010-08-26 19:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: McGehee, Robert <robert.mcgehee@geodecapital.com>; pgsql-admin; pgsql-hackers <pgsql-hackers@postgresql.org>
Excerpts from Tom Lane's message of jue ago 26 14:59:43 -0400 2010:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Code is here:
> > else if (deptype == SHARED_DEPENDENCY_ACL)
> > appendStringInfo(descs, _("access to %s"), objdesc);
> > in StoreObjectDescription().
>
> > Happy to change it to whatever is deemed appropriate. "privileges for %s"
> > sounds good; I'll do that unless somebody comes up with a better idea
> > which outvotes this one.
>
> If you're not able to commit this in the next couple of hours, please
> let me know and I'll do it. RC1 wraps tonight.
Ok, I'll commit it soon, thanks for the notice.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2010-08-26 19:07 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 17:29 Unable to drop role McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-23 22:22 ` Alvaro Herrera <alvherre@commandprompt.com>
2010-08-24 00:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 13:25 ` McGehee, Robert <Robert.McGehee@geodecapital.com>
2010-08-24 13:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 16:28 ` Alex Hunsaker <badalex@gmail.com>
2010-08-24 16:53 ` Alvaro Herrera <alvherre@commandprompt.com>
2010-08-24 17:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-24 17:37 ` Robert Haas <robertmhaas@gmail.com>
2010-08-26 18:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-08-26 19:07 ` Alvaro Herrera <alvherre@commandprompt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox