Thread: Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences:

Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences:

From
Christopher Kings-Lynne
Date:
> Fix two bugs in change_owner_recurse_to_sequences: it was grabbing an
> overly strong lock on pg_depend, and it wasn't closing the rel when done.
> The latter bug was masked by the ResourceOwner code, which is something
> that should be changed.

I assume that this behaviour makes change owner on a table change owner 
of serial sequences?

Should we perhaps also propagate grant insert on a table to grant 
select, update on dependent serial sequences?

Chris


Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> I assume that this behaviour makes change owner on a table change owner 
> of serial sequences?

Yeah.

> Should we perhaps also propagate grant insert on a table to grant 
> select, update on dependent serial sequences?

Doesn't really follow.  That code is maintaining an invariant: the owner
of a table owns the associated indexes, toast table, sequences, etc.
There's no system-wide assumption that sequence privileges track table
privileges.
        regards, tom lane


On Sat, Mar 26, 2005 at 01:35:20AM -0500, Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> > Should we perhaps also propagate grant insert on a table to grant 
> > select, update on dependent serial sequences?
> 
> Doesn't really follow.  That code is maintaining an invariant: the owner
> of a table owns the associated indexes, toast table, sequences, etc.
> There's no system-wide assumption that sequence privileges track table
> privileges.

I brought this up a few months ago.  Tom, weren't your objections
based more on implementation concerns than on whether the idea
itself had merit?

http://archives.postgresql.org/pgsql-general/2004-10/msg00511.php

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


Michael Fuhr <mike@fuhr.org> writes:
> I brought this up a few months ago.  Tom, weren't your objections
> based more on implementation concerns than on whether the idea
> itself had merit?

No, my point was that making implicit sequences work transparently
requires more thought than this.  I'd like to see a fairly complete
plan put forward before we start installing random hacks on permissions.
        regards, tom lane