Re: Change lock requirements for adding a trigger - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Change lock requirements for adding a trigger
Date
Msg-id 1212613795.4148.209.camel@ebony.site
Whole thread Raw
In response to Re: Change lock requirements for adding a trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > We have
> > * relhasindex (bool) set by CREATE INDEX but not unset by DROP INDEX
> > * relhasrules (bool)
> > * reltriggers (int2)  set by CREATE and DROP, since its an integer
> 
> Right.
> 
> > If CREATE INDEX can take a Share lock and can update pg_class, why would
> > it not be theoretically possible for CREATE TRIGGER? 
> 
> It's (probably) theoretically possible, if we replace reltriggers with a
> bool that acts more like relhasindex, ie it's a hint to go look in
> pg_triggers.  My point was just that you can't arbitrarily decide that
> some operation needs only a given strength of lock if you are not up to
> speed on these sorts of details.

Understood. Wouldn't have looked there without your hint.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Overhauling GUCS
Next
From: Steve Atkins
Date:
Subject: Re: Overhauling GUCS