On Wed, Jun 08, 2005 at 05:45:45PM +0200, hubert depesz lubaczewski wrote: > hi > i have a stituation a situation where i have multiple tables, and multiple > triggers on all of them. > at least 1 or 2 triggers on at lease 4 different tables does updates to main > cache table. Do say, are there foreign keys on those tables? If there are, that may explain the deadlocks. This is a known problem, fixed in the development version, for which there is no complete solution on current releases (except for dropping the foreign keys completely.) One workaround that may reduce the ocurrence of deadlocks is to make the constraints INITIALLY DEFERRED, so that the checks happen as late as possible in the transaction. -- Alvaro Herrera (<alvherre[a]surnet.cl>) Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest "foo" someone someday shall type "supercalifragilisticexpialidocious" (5th Commandment for C programmers) ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend