[GENERAL] deadlock avoidance

2006-09-25 Thread Clarence Gardner
I noticed the following in some of our code today: select ... ... for update of a, b; Inasmuch as the cardinal rule for avoiding deadlocks is to acquire locks in a consistent order, should such a construction be avoided in favor of two separate "select ... for update" statements so that the o

[GENERAL] Not your father's question about deadlocks

2006-11-14 Thread Clarence Gardner
Once upon a time, I put a question regarding deadlocks to the group, and Tom Lane immediately answered with this: >The guy waiting on the tuple-specific lock is second in >line to actually mung the tuple. Whoever is first in line behind the >current tenant will be blocked trying to acquire ShareL

[GENERAL] Not your father's question about deadlocks

2006-11-15 Thread Clarence Gardner
Once upon a time, I put a question regarding deadlocks to the group, and Tom Lane immediately answered with this: >The guy waiting on the tuple-specific lock is second in >line to actually mung the tuple. Whoever is first in line behind the >current tenant will be blocked trying to acquire Share

[GENERAL] deadlock detected errors

2006-09-04 Thread Clarence Gardner
I am trying to locate the source of some deadlocks that have started cropping up recently, with little success, and I have a question regarding the message that accompanies them. The message my application gets is like this: Process 244 waits for ShareLock on transaction 39523645; blocked by proc