Re: Remaining 9.5 open items

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Remaining 9.5 open items
Date: 2015-12-04 17:55:49
Message-ID: 20151204175549.GO3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> Stephen Frost wrote:
> > * Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> > > Stephen Frost wrote:
> > >
> > > > The non-documentation question is around DROP OWNED. We need to either
> > > > have policies dropped by DROP OWNED (well, roles removed, unless it's
> > > > the last one, in which case the policy should be dropped), or update the
> > > > documentation to reflect that they don't. I had been thinking we'd
> > > > fix DROP OWNED to deal with the policies, but if folks feel it's too
> > > > late for that kind of a change, then we can simply document it. I don't
> > > > believe that's unreasonable for a new feature and we can work to get it
> > > > addressed in 9.6.
> > >
> > > DROP OWNED is documented as a mechanism to help you drop the role, so
> > > it should do whatever is needed for that. I don't think documenting the
> > > fact that it leaves the user as part of policies is good enough.
> >
> > We already can't take care of everything with DROP OWNED though, since
> > we can't do cross-database queries, and the overall process almost
> > certainly requires additional effort (to reassign objects, etc...), so
> > while I'd be happier if policies were handled by it, I don't think it's
> > as serious of an issue.
>
> Yes, the documentation says to apply a combination of REASSIGN OWNED
> plus DROP OWNED to each database. Sure, it's not a single command, but
> if you additionally put the burden that the policies must be taken care
> of separately, then the whole process is made a little worse.
>
> > Still, I'll get a patch worked up for it and then we can discuss the
> > merits of that patch going in to 9.5 now versus just into HEAD.
>
> Cool.
>
> In the past, we've made a bunch of changes to DROP OWNED in order to
> deal with object types that caused errors, even in minor releases. I
> think this is just another case of the same problem.

Patch attached for review/comment.

I noticed in passing that the role removal documentation should really
also discuss shared objects (as the DROP OWNED BY reference page does).

Thanks!

Stephen

Attachment Content-Type Size
drop-owned-policies.v1.patch text/x-diff 12.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-12-04 17:56:34 Re: dynloader.h missing in prebuilt package for Windows?
Previous Message Tom Lane 2015-12-04 17:53:59 Re: More stable query plans via more predictable column statistics