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

Re: Change lock requirements for adding a trigger

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Decibel! <decibel(at)decibel(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change lock requirements for adding a trigger
Date: 2008-06-04 21:09:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)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 
 PostgreSQL Training, Services and Support

In response to

pgsql-hackers by date

Next:From: BRUSSER MichaelDate: 2008-06-04 21:10:02
Subject: Re: Overhauling GUCS
Previous:From: Tom LaneDate: 2008-06-04 20:57:32
Subject: Re: Overhauling GUCS

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