Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-09-13 Thread Stephen Frost
Tom, all, * Stephen Frost (sfr...@snowman.net) wrote: > Alright, here's an updated patch which cleans things up a bit and adds > comments to explain what's going on. I also updated the comments in > acl.h to explain that ordering actually does matter. Getting back to this, here's rebased patches

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-08-03 Thread Stephen Frost
Tom, all, * Stephen Frost (sfr...@snowman.net) wrote: > This needs more cleanup, testing, and comments explaining why we're > doing this (and then perhaps comments, somewhere.. in the backend ACL > code that explains that the ordering needs to be preserved), but the > basic idea seems sound to me

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-31 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> AFAICT, pg_dump has no notion that it needs to be careful about the order > >> in which permissions are granted. I did > > > I'm afraid that's correct, though I believe that's alw

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-26 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> AFAICT, pg_dump has no notion that it needs to be careful about the order >> in which permissions are granted. I did > I'm afraid that's correct, though I believe that's always been the case. > I spent some time looking into this

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-26 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > AFAICT, pg_dump has no notion that it needs to be careful about the order > in which permissions are granted. I did I'm afraid that's correct, though I believe that's always been the case. I spent some time looking into this today and from what I've

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-26 Thread Tom Lane
... btw, while you're working on this, it'd be nice if you fixed the header comment for dumpACL(). It is unintelligible as to what racls is, and apparently feels that it need not discuss initacls or initracls at all. I can't say that the reference to "fooacl" is really obvious either.

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-26 Thread tushar
On 07/26/2017 02:12 AM, Tom Lane wrote: AFAICT, pg_dump has no notion that it needs to be careful about the order in which permissions are granted. I did regression=# create user joe; CREATE ROLE regression=# create user bob; CREATE ROLE regression=# create user alice; CREATE ROLE regression=#

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Tom Lane
Stephen Frost writes: > On Tue, Jul 25, 2017 at 20:29 Thom Brown wrote: >> I should point out that this commit was made during the 9.6 cycle, and >> I get the same issue with 9.6. > Interesting that Tom didn't. Still, that does make more sense to me. Yeah, it makes more sense to me too, but non

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Stephen Frost
Thom, On Tue, Jul 25, 2017 at 20:29 Thom Brown wrote: > On 26 July 2017 at 00:52, Stephen Frost wrote: > > Thom, > > > > * Thom Brown (t...@linux.com) wrote: > >> This is the culprit: > >> > >> commit 23f34fa4ba358671adab16773e79c17c92cbc870 > >> Author: Stephen Frost > >> Date: Wed Apr 6 21

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Thom Brown
On 26 July 2017 at 00:52, Stephen Frost wrote: > Thom, > > * Thom Brown (t...@linux.com) wrote: >> This is the culprit: >> >> commit 23f34fa4ba358671adab16773e79c17c92cbc870 >> Author: Stephen Frost >> Date: Wed Apr 6 21:45:32 2016 -0400 > > Thanks! I'll take a look tomorrow. I should point o

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Stephen Frost
Thom, * Thom Brown (t...@linux.com) wrote: > This is the culprit: > > commit 23f34fa4ba358671adab16773e79c17c92cbc870 > Author: Stephen Frost > Date: Wed Apr 6 21:45:32 2016 -0400 Thanks! I'll take a look tomorrow. Stephen signature.asc Description: Digital signature

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Thom Brown
On 25 July 2017 at 21:47, Stephen Frost wrote: > Tom, > > On Tue, Jul 25, 2017 at 16:43 Tom Lane wrote: >> >> AFAICT, pg_dump has no notion that it needs to be careful about the order >> in which permissions are granted. I did >> >> regression=# create user joe; >> CREATE ROLE >> regression=# cr

Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Stephen Frost
Tom, On Tue, Jul 25, 2017 at 16:43 Tom Lane wrote: > AFAICT, pg_dump has no notion that it needs to be careful about the order > in which permissions are granted. I did > > regression=# create user joe; > CREATE ROLE > regression=# create user bob; > CREATE ROLE > regression=# create user alice

[HACKERS] pg_dump does not handle indirectly-granted permissions properly

2017-07-25 Thread Tom Lane
AFAICT, pg_dump has no notion that it needs to be careful about the order in which permissions are granted. I did regression=# create user joe; CREATE ROLE regression=# create user bob; CREATE ROLE regression=# create user alice; CREATE ROLE regression=# \c - joe You are now connected to database