| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
| Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: funny lock mode in DropTrigger |
| Date: | 2011-10-21 16:19:35 |
| Message-ID: | 12326.1319213975@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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 (or the comment) is not right.
Yeah, this is a bug. I think what happened is:
1. Simon committed his patch to reduce lock levels.
2. Robert copied that lock level in his commit
4240e429d0c2d889d0cda23c618f94e12c13ade7 that refactored use
of RangeVarGetRelid.
3. When I reverted most of Simon's change, it didn't occur to me to
look for places that had copied the bad lock levels --- I was
just looking at what his patch had done.
I will fix this, and also do some looking to see if the bogus lock
levels propagated anywhere else...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-10-21 16:20:57 | Re: funny lock mode in DropTrigger |
| Previous Message | Florian Pflug | 2011-10-21 16:05:03 | Re: Synchronized snapshots versus multiple databases |