Re: Dependencies on shared objects

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

On Tue, Jul 05, 2005 at 02:47:15PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)surnet(dot)cl> writes:
> > I attach a patch to implement dependencies on shared objects.
> > As some of you may remember, the purpose of this patch is to record
> > dependencies on shared objects, such as roles and tablespaces, from
> > regular database objects. This is done on a new shared system catalog
> > called pg_shdepend, so that when a backend wants to drop any shared
> > object, it can easily verify whether it is referenced in other database.
>
> Will work on applying this next.

Cool.

> > - added a dependency type. There are three types: PIN, same as normal
> > dependencies; OWNER, for roles that own objects; NORMAL, all the rest
> > (roles in the Acl and tablespaces).
> > I needed to separate the OWNER entries to support changing ownership
> > of objects without having to poke the whole Acl for the object.
>
> Although I don't have any particular objection to the OWNER/NORMAL
> distinction, your explanation doesn't seem to make sense. Don't you
> have to poke the Acl anyway, if it's non-null? Else the grantor values
> will be wrong.

Hum, we don't register a dependency on the owner when registering
dependencies from the Acl -- we actively skip that (because we know the
owner has an entry of the other type already). Is this still an issue?

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"La verdad no siempre es bonita, pero el hambre de ella sí"

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-05 19:51:32 Re: Dependencies on shared objects
Previous Message Bruce Momjian 2005-07-05 19:40:23 Re: Autovacuum integration patch