Re: locks in CREATE TRIGGER, ADD FK - Mailing list pgsql-hackers

From Neil Conway
Subject Re: locks in CREATE TRIGGER, ADD FK
Date
Msg-id 423FB6C3.8010107@samurai.com
Whole thread Raw
In response to locks in CREATE TRIGGER, ADD FK  (Neil Conway <neilc@samurai.com>)
List 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


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: locks in CREATE TRIGGER, ADD FK
Next
From: Pavel Stehule
Date:
Subject: Re: Proposal: OUT parameters for plpgsql