Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-05-04 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Both of these have got race conditions ... not but what the dependency >> code has got race condition problems already, but maybe we should try >> to avoid introducing more? I haven't got any better ideas though. > I couldn't parse t

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-05-04 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > So I'm currently considering the following alternatives: > > > 1. do nothing at all with pg_shdepend. Upon role deletion, seqscan > > pg_auth_members and reject the drop altogether if there is a role > > granted to another which men

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-05-04 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > So I'm currently considering the following alternatives: > 1. do nothing at all with pg_shdepend. Upon role deletion, seqscan > pg_auth_members and reject the drop altogether if there is a role > granted to another which mentions the to-be-dropped role

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-05-03 Thread Alvaro Herrera
Jeff Davis wrote: > GRANT "postgres" TO "test_role" GRANTED BY ""; > > We either need to rethink the way we handle grantor information and when it's > valid. > Or we need to at least allow dump/restore to work as expected when a dropped > role > granted privileges to other users. I've been st

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-24 Thread Russell Smith
Alvaro Herrera wrote: Russell Smith wrote: As I am not a frequent reporter of bugs, what happens now? It's been a week since I wrote my last message and I'm unsure of whether anything has, or is going to happen about this bug report. Alvaro has said it's a "bug", so it needs fixing. But

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-24 Thread Alvaro Herrera
Russell Smith wrote: > As I am not a frequent reporter of bugs, what happens now? It's been a > week since I wrote my last message and I'm unsure of whether anything > has, or is going to happen about this bug report. Alvaro has said it's > a "bug", so it needs fixing. But that has not trans

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-24 Thread Russell Smith
Russell Smith wrote: CREATE ROLE test_role NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; CREATE ROLE invalid_grantor SUPERUSER INHERIT NOCREATEDB NOCREATEROLE; SET ROLE invalid_grantor; GRANT "postgres" TO "test_role"; SET ROLE postgres; select * from pg_roles; select pg_auth_members.*,

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-18 Thread Russell Smith
Alvaro Herrera wrote: Russell Smith wrote: Alvaro Herrera wrote: Jeff Davis wrote: CREATE ROLE test_role NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; CREATE ROLE invalid_grantor SUPERUSER INHERIT NOCREATEDB NOCREATEROLE; SET ROLE invalid_grantor; GRANT "postgres" TO "test

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-17 Thread Alvaro Herrera
Russell Smith wrote: > Alvaro Herrera wrote: > >Jeff Davis wrote: > > > > > >>CREATE ROLE test_role > >> NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; > >> > >>CREATE ROLE invalid_grantor > >> SUPERUSER INHERIT NOCREATEDB NOCREATEROLE; > >> > >>SET ROLE invalid_grantor; > >>GRANT "postgres" TO

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-17 Thread Russell Smith
Alvaro Herrera wrote: Jeff Davis wrote: CREATE ROLE test_role NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; CREATE ROLE invalid_grantor SUPERUSER INHERIT NOCREATEDB NOCREATEROLE; SET ROLE invalid_grantor; GRANT "postgres" TO "test_role"; SET ROLE postgres; select * from pg_roles;

Re: [BUGS] Grantor name gets lost when grantor role dropped

2007-04-16 Thread Alvaro Herrera
Jeff Davis wrote: > CREATE ROLE test_role > NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; > > CREATE ROLE invalid_grantor > SUPERUSER INHERIT NOCREATEDB NOCREATEROLE; > > SET ROLE invalid_grantor; > GRANT "postgres" TO "test_role"; > SET ROLE postgres; > > select * from pg_roles; > > se

[BUGS] Grantor name gets lost when grantor role dropped

2007-04-16 Thread Jeff Davis
I am sending this email on behalf of Russel Smith. He discovered this bug and his description follows: Verified on 8.2.3 on Fedora Core 6 Verified on 8.1.3 on RHEL4, custom compile. (I can't control the update to 8.1.8) The output of an empty role name would possibly not be a problem, but when