Lists: | pgsql-adminpgsql-hackers |
---|
From: | "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Unable to drop role |
Date: | 2010-08-23 17:29:47 |
Message-ID: | EEBC169715EB8C438D3C9283AF0F201C08DF4C41@MSGBOSCLM2WIN.DMN1.FMR.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
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
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Unable to drop role |
Date: | 2010-08-23 22:22:18 |
Message-ID: | 1282602055-sup-6731@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 00:11:15 |
Message-ID: | 16094.1282608675@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
"McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)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
From: | "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 13:25:30 |
Message-ID: | EEBC169715EB8C438D3C9283AF0F201C08DF4CAF@MSGBOSCLM2WIN.DMN1.FMR.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
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(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, August 23, 2010 8:11 PM
To: McGehee, Robert
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Unable to drop role
"McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com> |
Cc: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 13:36:05 |
Message-ID: | 27616.1282656965@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
"McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)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
From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 16:28:56 |
Message-ID: | AANLkTikRR-VjgkCFXCG8+D719sWz-4RJPOVCj3toz7zc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
On Tue, Aug 24, 2010 at 07:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 16:53:45 |
Message-ID: | 1282668427-sup-64@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Excerpts from Tom Lane's message of mar ago 24 09:36:05 -0400 2010:
> "McGehee, Robert" <Robert(dot)McGehee(at)geodecapital(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-24 17:19:37 |
Message-ID: | 1696.1282670377@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)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
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Unable to drop role |
Date: | 2010-08-24 17:37:36 |
Message-ID: | AANLkTim=b-xPYZ5ynSGrxKGH5JMt=FXY02kfPco8sjdS@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
On Tue, Aug 24, 2010 at 1:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unable to drop role |
Date: | 2010-08-26 18:59:43 |
Message-ID: | 26428.1282849183@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)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
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "McGehee, Robert" <robert(dot)mcgehee(at)geodecapital(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Unable to drop role |
Date: | 2010-08-26 19:07:57 |
Message-ID: | 1282849655-sup-7679@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin pgsql-hackers |
Excerpts from Tom Lane's message of jue ago 26 14:59:43 -0400 2010:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support