Unix Technical Forum

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

This is a discussion on Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences: within the pgsql Hackers forums, part of the PostgreSQL category; --> > Fix two bugs in change_owner_recurse_to_sequences: it was grabbing an > overly strong lock on pg_depend, and it wasn't ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:14 AM
Christopher Kings-Lynne
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences:

> 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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:14 AM
Tom Lane
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences: it was

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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 03:14 AM
Michael Fuhr
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences: it was

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...0/msg00511.php

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 03:14 AM
Tom Lane
 
Posts: n/a
Default Re: [COMMITTERS] pgsql: Fix two bugs in change_owner_recurse_to_sequences: it was

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:53 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com