Re: [HACKERS] Change lock requirements for adding a trigger

2008-07-16 Thread Bruce Momjian
Added to TODO: * Reduce locking requirements for creating a trigger http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php --- Simon Riggs wrote: > > On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote: > > Si

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-13 Thread Simon Riggs
On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> 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 CR

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-04 Thread Simon Riggs
On Wed, 2008-06-04 at 16:33 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> 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 CR

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-04 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> 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 >

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-04 Thread Simon Riggs
On Wed, 2008-06-04 at 10:59 -0400, Tom Lane wrote: > Decibel! <[EMAIL PROTECTED]> 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

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-04 Thread Tom Lane
Decibel! <[EMAIL PROTECTED]> 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. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-04 Thread Decibel!
On Jun 3, 2008, at 5:04 PM, Simon Riggs wrote: On Tue, 2008-06-03 at 16:48 -0500, Decibel! wrote: On May 30, 2008, at 9:51 AM, Simon Riggs wrote: On Thu, 2008-05-29 at 19:18 -0500, Decibel! wrote: Is there a reason that we can't add a trigger to a table while a select is running? This is a ser

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-03 Thread Simon Riggs
On Tue, 2008-06-03 at 16:48 -0500, Decibel! wrote: > On May 30, 2008, at 9:51 AM, Simon Riggs wrote: > > On Thu, 2008-05-29 at 19:18 -0500, Decibel! wrote: > >> Is there a reason that we can't add a trigger to a table while a > >> select is running? This is a serious pain when trying to setup > >>

Re: [HACKERS] Change lock requirements for adding a trigger

2008-06-03 Thread Decibel!
On May 30, 2008, at 9:51 AM, Simon Riggs wrote: On Thu, 2008-05-29 at 19:18 -0500, Decibel! wrote: Is there a reason that we can't add a trigger to a table while a select is running? This is a serious pain when trying to setup londiste or slony. This is constrained by locking. There are a sub

Re: [HACKERS] Change lock requirements for adding a trigger

2008-05-30 Thread Simon Riggs
On Thu, 2008-05-29 at 19:18 -0500, Decibel! wrote: > Is there a reason that we can't add a trigger to a table while a > select is running? This is a serious pain when trying to setup > londiste or slony. This is constrained by locking. There are a subset of DDL commands that might be able t

[HACKERS] Change lock requirements for adding a trigger

2008-05-29 Thread Decibel!
Is there a reason that we can't add a trigger to a table while a select is running? This is a serious pain when trying to setup londiste or slony. -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828 smime.