Skip site navigation (1) Skip section navigation (2)

Re: [WIP] The shared dependency patch

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [WIP] The shared dependency patch
Date: 2004-12-17 18:01:28
Message-ID: 1103306488.700.48.camel@home (view raw or flat)
Thread:
Lists: pgsql-patches
On Fri, 2004-12-17 at 14:48 -0300, Alvaro Herrera wrote:
> On Thu, Dec 16, 2004 at 12:46:46PM -0500, Tom Lane wrote:
> 
> > IIRC, Rod Taylor did some work on supporting locks for non-table objects
> > back around the beginning of the year.  We rejected the patch for various
> > reasons but you might be able to adopt some of it.
> 
> At the beggining of the past year, you mean?  I found this:
> 
> From: Rod Taylor <rbt(at)rbt(dot)ca>
> To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
> Date: 15 Feb 2003 19:50:46 -0500
> Subject: Object (Domain) locking
> 
> http://archives.postgresql.org/pgsql-patches/2003-02/msg00093.php
> 
> In the archives, I see Bruce's message telling that it was applied, then
> it was backed out for untold reasons, and nothing else happenned.
> 
> Does anyone remember why the patch was backed out?  A pointer to the
> archives would be most helpful.

In order to prevent the ability for a domain, schema, etc. to be dropped
while another process was using it, we were going to need to take a
large number of new locks for nearly everything done (simple select
statements included). I.e. Locks on all data types used in a simple
select.

I don't remember if there was a specific reason given, but I've presumed
it was due to the above and the resulting performance hit.

> > Or you could do something like the pg_xactlock hack.  Basically you need
> > a convention that identifies a LOCKTAG value as locking a particular
> > user, such that it can't exactly equal any lock on a regular relation.
> 
> Hmm.  The problem is that I need to lock users, groups and tablespaces,
> so a single value won't do.  I could create three special values
> (pg_userlock, pg_grouplock, pg_tblspclock?), but at that point it
> seems something more general is needed, like maybe Rod's patch.
-- 


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-12-17 18:50:06
Subject: Re: [WIP] The shared dependency patch
Previous:From: Alvaro HerreraDate: 2004-12-17 17:48:19
Subject: Re: [WIP] The shared dependency patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group