Re: pg_dump dump catalog ACLs

From: Noah Misch <noah(at)leadboat(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump dump catalog ACLs
Date: 2016-04-23 23:11:36
Message-ID: 20160423231136.GC2084318@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 22, 2016 at 08:24:53PM -0400, Stephen Frost wrote:
> * Noah Misch (noah(at)leadboat(dot)com) wrote:
> > On Tue, Apr 05, 2016 at 05:50:18PM -0400, Stephen Frost wrote:
> > > Subject: [PATCH 4/5] In pg_dump, include pg_catalog and extension ACLs, if
> > > changed
> > >
> > > Now that all of the infrastructure exists, add in the ability to
> > > dump out the ACLs of the objects inside of pg_catalog or the ACLs
> > > for objects which are members of extensions, but only if they have
> > > been changed from their original values.
> >
> > I wrote the attached test script to verify which types of ACLs dump/reload
> > covers. Based on the commit message, I expected these results:
> >
> > Dumped: type, class, attribute, proc, largeobject_metadata,
> > foreign_data_wrapper, foreign_server,
> > language(in-extension), namespace(in-extension)
> > Not dumped: database, tablespace,
> > language(from-initdb), namespace(from-initdb)
> >
> > Did I interpret the commit message correctly? The script gave these results:
> >
> > Dumped: type, class, attribute, namespace(from-initdb)
> > Not dumped: database, tablespace, proc, language(from-initdb)
>
> You interpreted the commit message correctly and in a number of cases
> the correct results are generated, but there's an issue in the WHERE
> clause being used for some of the object types.

I'm wondering whether it would be a slightly better design to treat
language(from-initdb) like language(in-extension). Likewise for namespaces.
The code apparently already exists to dump from-initdb namespace ACLs. Is
there a user interface design reason to want to distinguish the from-initdb
and in-extension cases?

> That's relatively straight-forward to fix, but I'm going to put
> together a series of TAP tests to go with these fixes. While I tested
> various options and bits and pieces of the code while developing, this
> really needs a proper test suite that runs through all of these
> permutations with each change.

Sounds great. Thanks.

> I'm planning to have that done by the end of the weekend.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2016-04-24 01:54:07 Re: xlc atomics
Previous Message Noah Misch 2016-04-23 22:51:19 Re: pg_dump dump catalog ACLs