From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Moshe Jacobson <moshe(at)neadwerx(dot)com>, daniele(dot)varrazzo(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension |
Date: | 2017-01-20 22:10:40 |
Message-ID: | 20170120221039.GZ18360@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom, Moshe,
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> >> Hmm. There's an argument to be made that ALTER EXTENSION ADD should
> >> absorb whatever the object's current ACLs are into the pg_init_privs
> >> entries for the extension. (I don't think it does that now, though
> >> I might be wrong.) However ...
>
> > I've not gone and looked yet, but I doubt that it does. I think I can
> > agree with the argument that it really should add those ACLs to
> > pg_init_privs. Of course, any furhter manipulation of the ACLs from
> > that point will cause those ACLs to be included in the pg_dump.
>
> > I'll take a look at ALTER EXTENSION ADD and pg_init_privs.
>
> By the same token, does ALTER EXTENSION DROP remove those entries?
Please find attached a WIP patch to have ALTER EXTENSION ADD/DROP update
pg_init_privs accordingly.
It's a bit big as it needs to have independent code for every different
kind of object that ALTER EXTENSION ADD/DROP supports. Most of that
code is pretty boiler-plate, of course.
I'm planning to review it further, add more regression tests, and then
back-patch it to 9.6.
Moshe, if you're feeling adventurous and want to give it a spin and make
sure it behaves as you're expecting, that'd be great.
Tom, your thoughts and comments are always welcome, if you'd like to
peruse the patch, of course.
Otherwise, I expect to have time to wrap this all up over the weekend.
Thanks!
Stephen
Attachment | Content-Type | Size |
---|---|---|
alter_ext_adddrop_init_privs_v1_master.patch | text/x-diff | 22.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | nuliknol | 2017-01-23 05:31:25 | BUG #14508: PLPGSQL does not recognize nested user defined types |
Previous Message | Tom Lane | 2017-01-20 16:55:47 | Re: BUG #14505: explain verbose for postgresql_fdw |