funny lock mode in DropTrigger

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: funny lock mode in DropTrigger
Date: 2011-10-21 03:40:26
Message-ID: 1319168198-sup-8313@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I just noticed that DropTrigger uses ShareRowExclusiveLock to lock the
relation it's going to drop the trigger on. The comment right above it
says that this should match RemoveTriggerById, but that one uses
AccessExclusiveLock -- so one of them (or the comment) is not right.

Besides, the docs state that no backend code uses ShareRowExclusiveLock
anyway (13.3 Explicit locking). I guess that if the patch to reduce
lock strength in alter table goes in again, it'll need to update this
chapter to match.

--
Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-10-21 04:01:18 Re: funny lock mode in DropTrigger
Previous Message Robert Haas 2011-10-21 03:01:52 Re: loss of transactions in streaming replication