Re: Dependencies on shared objects - Mailing list pgsql-patches

From Tom Lane
Subject Re: Dependencies on shared objects
Date
Msg-id 5112.1120769159@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dependencies on shared objects  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-patches
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On Tue, Jul 05, 2005 at 03:51:32PM -0400, Tom Lane wrote:
> An important distinction to be made is which dependencies are "auto" and
> which ones are "normal".  It's clear that OWNER entries cannot be AUTO.
> OTOH grantee entries in the ACL can be (have to be) dropped
> automatically, but what to do about grantor ones?  We may have to do a
> distinction.  We could drop the grants for which the dropped user is the
> grantor; but not automatically, I think.

For the moment I left this alone; you can revisit the question when
you do DROP OWNED or whatever we end up calling it.

I've committed the patch with some revisions --- principally that I took
out tracking of dependencies on tablespaces, as I couldn't see any real
argument that we need to track that separately from the filesystem
structure.  (I was also a bit concerned about whether copying a database
to a different default tablespace would work correctly.)

I ended up calling the dependency types OWNER and ACL; there is no
NORMAL at the moment.  Obviously we'd need to add more dependency types
to track dependencies on anything but roles.  The reason for this is
that getting the ALTER OWNER case right requires removing ACL dependency
entries for the new owner, and I didn't like the idea of issuing a
blanket removal except against a very specifically defined dependency
type.  Also, I figured out why you needed the separate OWNER dependency
type: it's so you can tell which entry to update during ALTER OWNER.
This is hopefully a bit better documented now.

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: A couple of p.tches for PostgreSQL 64bit support
Next
From: Koichi Suzuki
Date:
Subject: Re: A couple of patches for PostgreSQL 64bit support