Re: Grantor name gets lost when grantor role dropped

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-bugs(at)postgresql(dot)org, mr-russ(at)pws(dot)com(dot)au, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Grantor name gets lost when grantor role dropped
Date: 2007-05-04 16:41:29
Message-ID: 4090.1178296889@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> 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 this paragraph very well. However I'm not sure why you
> say the dependency code has got race conditions? We do lock the object
> before checking the dependencies, so it's not possible to add a new
> dependency while we're dropping the object.

Sorry, I was thinking of the regular dependency code, which has open
bug report(s) based on exactly the fact that there's no such locking.
shdepend may be OK, since it's fundamentally only dealing in roles.

>> Why is it that we record grantor at all? One could argue that granting
>> membership in a role is done on behalf of that role and there's no real
>> need to remember exactly who did it.

> I think you should ask Stephen Frost about that -- added to CC.

> If the grantor bit is not important, then what we should do is just omit
> emitting the GRANTED BY part in pg_dumpall, which fixes this report.

It's at least something we should reflect on before sweating hard to
make it work...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jose Blanco 2007-05-04 17:59:46 Re: order by question.
Previous Message Alvaro Herrera 2007-05-04 16:34:01 Re: Grantor name gets lost when grantor role dropped

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-05-04 16:46:54 Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Previous Message Tom Lane 2007-05-04 16:38:18 Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first