diff options
author | Neil Conway <neilc@samurai.com> | 2005-03-24 00:03:26 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2005-03-24 00:03:26 +0000 |
commit | 50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e (patch) | |
tree | 59e74d9c83918c0d3f49fce524d94c945751092f /src/backend/commands/tablecmds.c | |
parent | 8abba638599113e8c742c6f97a204c625db36b43 (diff) | |
download | postgresql-50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e.tar.gz postgresql-50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e.zip |
Revert changes to CREATE TRIGGER and ALTER TABLE ADD FOREIGN KEY locking,
per request from Tom.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 1a6c1f82625..7c19bcd3363 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.149 2005/03/23 07:44:57 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.150 2005/03/24 00:03:22 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -3829,13 +3829,13 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel, Oid constrOid; /* - * Grab a lock on the pk table, so that someone doesn't delete - * rows out from under us. We will eventually need to add triggers - * to the table, at which point we'll need to an ExclusiveLock -- - * therefore we grab an ExclusiveLock now to prevent possible - * deadlock. + * Grab an exclusive lock on the pk table, so that someone doesn't + * delete rows out from under us. (Although a lesser lock would do for + * that purpose, we'll need exclusive lock anyway to add triggers to + * the pk table; trying to start with a lesser lock will just create a + * risk of deadlock.) */ - pkrel = heap_openrv(fkconstraint->pktable, ExclusiveLock); + pkrel = heap_openrv(fkconstraint->pktable, AccessExclusiveLock); /* * Validity and permissions checks |