Re: [GENERAL] Deadlock when updating table partitions (and presumed solution)

2007-12-06 Thread Paul Boddie
On 5 Des, 05:00, [EMAIL PROTECTED] (Tom Lane) wrote: > > Yeah, this is a problem. The SELECT will acquire AccessShareLock > on R and P, and subsequently try to acquire AccessShareLock on all > the inheritance children of P (and I don't think the order in which > these locks are acquired is very cl

Re: [GENERAL] Deadlock when updating table partitions (and presumed solution)

2007-12-04 Thread Tom Lane
Paul Boddie <[EMAIL PROTECTED]> writes: > I have one process querying a table P with partitions P0, P1, P2, ... > Pn joined with table R as follows: > select * from R inner join P on R.id = P.id and P.section = 5 > ... > I have another process performing updates to individual partitions of > P - sp

[GENERAL] Deadlock when updating table partitions (and presumed solution)

2007-12-04 Thread Paul Boddie
I recently encountered an interesting situation with regard to partitioned tables, concurrent updates and deadlocks which probably has an obvious explanation, although I can't seem to find one in the manual. Below, I explain the situation and provide some of my own naive reasoning about what seems