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

Re: FOREIGN KEY and AccessExclusiveLock

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: FOREIGN KEY and AccessExclusiveLock
Date: 2004-09-29 13:19:26
Message-ID: Pine.LNX.4.44.0409291611520.704-100000@matrix.gatewaynet.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hmm, (something went wrong with some mailer)

Tom Lane wrote:
> We're adding a trigger to it.

From the docs:
============================================================================
ACCESS EXCLUSIVE

 Conflicts with locks of all modes (ACCESS SHARE, ROW SHARE, ROW 
EXCLUSIVE, SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE, EXCLUSIVE, 
and ACCESS EXCLUSIVE). This mode guarantees that the holder is the only 
transaction accessing the table in any way. 


Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL 
commands. This is also the default lock mode for LOCK TABLE statements 
that do not specify a mode explicitly. 


Tip: Only an ACCESS EXCLUSIVE lock blocks a SELECT (without FOR UPDATE) 
statement. 
============================================================================

Now, is the lock acquired for the CREATE TRIGGER an explicit
LOCK TABLE?
Because nothing is mentioned about triggers in 
http://www.postgresql.org/docs/7.4/interactive/explicit-locking.html
-- 
-Achilleus


In response to

Responses

pgsql-sql by date

Next:From: Marco GaiarinDate: 2004-09-29 13:21:21
Subject: Re: Porting problem from Informix to Postgres...
Previous:From: Achilleus MantziosDate: 2004-09-29 05:36:07
Subject: Re: FOREIGN KEY and AccessExclusiveLock

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