summaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
diff options
context:
space:
mode:
authorTom Lane2011-10-21 17:49:51 +0000
committerTom Lane2011-10-21 17:50:30 +0000
commit5ac5980744149f062ec599015ffe7a7689dd117b (patch)
tree34ee02ba5efe8c5f3ce096213010e4a0f63a619b /src/backend/commands/trigger.c
parentc8e8b5a6e20bf471d83059aebe64bca16f184057 (diff)
More cleanup after failed reduced-lock-levels-for-DDL feature.
Turns out that use of ShareUpdateExclusiveLock or ShareRowExclusiveLock to protect DDL changes had gotten copied into several places that were not touched by either of Simon's original patches for the feature, and thus neither he nor I thought to revert them. (Indeed, it appears that two of these uses were committed *after* the reversion, which just goes to show that git merging is no panacea.) Change these places to use AccessExclusiveLock again. If we ever manage to resurrect that feature, we're going to have to think a bit harder about how to keep lock level usage in sync for DDL operations that aren't within the AlterTable infrastructure. Two of these bugs are only in HEAD, but one is in the 9.1 branch too. Alvaro found one of them, I found the other two.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r--src/backend/commands/trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 9fb97548485..a6e7268aa78 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -1038,7 +1038,7 @@ DropTrigger(RangeVar *relation, const char *trigname, DropBehavior behavior,
ObjectAddress object;
/* lock level should match RemoveTriggerById */
- relid = RangeVarGetRelid(relation, ShareRowExclusiveLock, false, false);
+ relid = RangeVarGetRelid(relation, AccessExclusiveLock, false, false);
object.classId = TriggerRelationId;
object.objectId = get_trigger_oid(relid, trigname, missing_ok);