Re: Dependencies on shared objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Alvaro Herrera <alvherre(at)surnet(dot)cl>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Dependencies on shared objects
Date: 2005-07-07 20:45:59
Message-ID: 5112.1120769159@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Koichi Suzuki 2005-07-08 00:36:10 Re: A couple of patches for PostgreSQL 64bit support
Previous Message Alvaro Herrera 2005-07-07 17:11:21 Re: A couple of p.tches for PostgreSQL 64bit support