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 20:28:08
Message-ID: 1212611288.4148.207.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 2008-06-04 at 10:59 -0400, Tom Lane wrote:
> Decibel! <decibel(at)decibel(dot)org> writes:
> > Ok, I'll take a stab at such a list. Can anyone think of any reasons  
> > why CREATE TRIGGER couldn't get by with ShareLock?
> 
> pg_class.reltriggers.

ISTM that we do this in many ways on pg_class, if we believe the docs.

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

Seems we should have one consistent way of adding associated objects.

If CREATE INDEX can take a Share lock and can update pg_class, why would
it not be theoretically possible for CREATE TRIGGER? 

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


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-06-04 20:29:43
Subject: Re: Proposal: new function array_init
Previous:From: Pavel StehuleDate: 2008-06-04 20:22:11
Subject: Re: Proposal: new function array_init

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