Re: [HACKERS] funny lock mode in DropTrigger

2011-10-21 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of vie oct 21 00:40:26 -0300 2011: 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

[HACKERS] funny lock mode in DropTrigger

2011-10-21 Thread Alvaro Herrera
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

Re: [HACKERS] funny lock mode in DropTrigger

2011-10-21 Thread Tom Lane
Alvaro Herrera alvhe...@alvh.no-ip.org writes: 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

Re: [HACKERS] funny lock mode in DropTrigger

2011-10-21 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Ah, I also noticed that the ALTER EXTENSION and SECURITY LABEL commands use ShareUpdateExclusiveLock, and they failed when committed to note this in the 13.3 chapter of the docs. Not sure how strict we are about documenting these things. (I