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

Re: locks in CREATE TRIGGER, ADD FK

From: Neil Conway <neilc(at)samurai(dot)com>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: locks in CREATE TRIGGER, ADD FK
Date: 2005-03-22 06:10:11
Message-ID: 423FB6C3.8010107@samurai.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Neil Conway wrote:
> AndrewSN pointed out on IRC that ALTER TABLE ... ADD FOREIGN KEY and 
> CREATE TRIGGER both acquire AccessExclusiveLocks on the table they are 
> adding triggers to (the PK table, in the case of ALTER TABLE). Is this 
> necessary? I don't see why we can't allow SELECT queries on the table to 
> proceed while the trigger is being added.

Sorry, I forgot to mention: I think RowExclusiveLock or ExclusiveLock 
would be sufficient instead.

-Neil

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2005-03-22 06:32:10
Subject: Re: Proposal: OUT parameters for plpgsql
Previous:From: Neil ConwayDate: 2005-03-22 05:56:31
Subject: locks in CREATE TRIGGER, ADD FK

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