Can you please  help me solve the problem of ERROR deadlock detected
This is the log incurred in postgressqlXXXX.log


2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "displet"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"screenscrapesource"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"squidmodeconfiguration"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "videosource"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "websource"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "decorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "display"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "application"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "audiodecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"borderdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"display_snapshot"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "imagedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "labeldecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusborderdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "window"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"applicationwindow"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"datetimedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "logodecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"perspectivewindow"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"snapshot_window"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"sourcenamedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statictextdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusborderdecorator_linestyle"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusimagedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statuslabeldecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "display"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "perspective"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "snapshot"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "application"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"display_snapshot"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "displet"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "message"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"perspectivewindow"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"snapshot_window"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "window"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"applicationwindow"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "decorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "audiodecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"borderdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "imagedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "labeldecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusborderdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"datetimedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table "logodecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"sourcenamedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statictextdecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusborderdecorator_linestyle"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statusimagedecorator"
2009-01-21 15:47:20 IST NOTICE:  truncate cascades to table
"statuslabeldecorator"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"systemvariablebinding"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"borderdecorator"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"statusborderdecorator_linestyle"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table "display"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"display_snapshot"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"snapshot_window"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table "application"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table "window"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"applicationwindow"
2009-01-21 15:47:21 IST NOTICE:  truncate cascades to table
"perspectivewindow"
2009-01-21 15:53:29 IST NOTICE:  truncate cascades to table "displet"
2009-01-21 15:53:29 IST NOTICE:  truncate cascades to table
"screenscrapesource"
2009-01-21 15:53:30 IST ERROR:  deadlock detected
2009-01-21 15:53:30 IST DETAIL:  Process 12648 waits for AccessShareLock on
relation 156727 of database 16403; blocked by process 11632.
 Process 11632 waits for AccessExclusiveLock on relation 156745 of database
16403; blocked by process 12648.
2009-01-21 15:53:30 IST STATEMENT:  select squidmodec0_.mId as mId24_5_,
squidmodec0_.mHoverDelay as mHoverDe2_24_5_, squidmodec0_.mBorderWidth as
mBorderW3_24_5_, squidmodec0_.mEnabled as mEnabled24_5_,
squidmodec0_.mLeftSource_mId as mLeftSou8_24_5_,
squidmodec0_.mRightSource_mId as mRightSo6_24_5_,
squidmodec0_.mTopSource_mId as mTopSource7_24_5_,
squidmodec0_.mBottomSource_mId as mBottomS5_24_5_, source1_.mId as mId32_0_,
source1_.mName as mName32_0_, source1_.mType as mType32_0_, source1_.mTag as
mTag32_0_, source1_.mDescription as mDescrip5_32_0_, source1_.mOnline as
mOnline32_0_, source1_.mAcknowledged as mAcknowl7_32_0_,
source1_.mAutoDetected as mAutoDet8_32_0_, source1_.mTimezone as
mTimezone32_0_, source1_.width as width32_0_, source1_.height as
height32_0_, source1_1_.mHost as mHost33_0_, source1_1_.mPassword as
mPassword33_0_, source1_1_.mPort as mPort33_0_, source1_1_.mTargetType as
mTargetT5_33_0_, source1_1_.mDesktopIdent as mDesktop6_33_0_, source1_1_.x
as x33_0_, source1_1_.y as y33_0_, source1_1_.width as width33_0_,
source1_1_.height as height33_0_, source1_1_.mWindowTitle as
mWindow11_33_0_, source1_1_.mManualUpdateMode as mManual12_33_0_,
source1_1_.mUpdateInterval as mUpdate13_33_0_, source1_2_.mURL as mURL34_0_,
source1_2_.mAudioDelay as mAudioDe3_34_0_, source1_2_.mAudioURL as
mAudioURL34_0_, source1_2_.mRemoteDesktopHost_mId as mRemoteD5_34_0_,
source1_3_.mURL as mURL35_0_, case when source1_1_.mId is not null then 1
when source1_2_.mId is not null then 2 when source1_3_.mId is not null then
3 when source1_.mId is not null then 0 end as clazz_0_, screenscra2_.mId as
mId32_1_, screenscra2_1_.mName as mName32_1_, screenscra2_1_.mType as
mType32_1_, screenscra2_1_.mTag as mTag32_1_, screenscra2_1_.mDescription as
mDescrip5_32_1_, screenscra2_1_.mOnline as mOnline32_1_,
screenscra2_1_.mAcknowledged as mAcknowl7_32_1_,
screenscra2_1_.mAutoDetected as mAutoDet8_32_1_, screenscra2_1_.mTimezone as
mTimezone32_1_, screenscra2_1_.width as width32_1_, screenscra2_1_.height as
height32_1_, screenscra2_.mHost as mHost33_1_, screenscra2_.mPassword as
mPassword33_1_, screenscra2_.mPort as mPort33_1_, screenscra2_.mTargetType
as mTargetT5_33_1_, screenscra2_.mDesktopIdent as mDesktop6_33_1_,
screenscra2_.x as x33_1_, screenscra2_.y as y33_1_, screenscra2_.width as
width33_1_, screenscra2_.height as height33_1_, screenscra2_.mWindowTitle as
mWindow11_33_1_, screenscra2_.mManualUpdateMode as mManual12_33_1_,
screenscra2_.mUpdateInterval as mUpdate13_33_1_, source3_.mId as mId32_2_,
source3_.mName as mName32_2_, source3_.mType as mType32_2_, source3_.mTag as
mTag32_2_, source3_.mDescription as mDescrip5_32_2_, source3_.mOnline as
mOnline32_2_, source3_.mAcknowledged as mAcknowl7_32_2_,
source3_.mAutoDetected as mAutoDet8_32_2_, source3_.mTimezone as
mTimezone32_2_, source3_.width as width32_2_, source3_.height as
height32_2_, source3_1_.mHost as mHost33_2_, source3_1_.mPassword as
mPassword33_2_, source3_1_.mPort as mPort33_2_, source3_1_.mTargetType as
mTargetT5_33_2_, source3_1_.mDesktopIdent as mDesktop6_33_2_, source3_1_.x
as x33_2_, source3_1_.y as y33_2_, source3_1_.width as width33_2_,
source3_1_.height as height33_2_, source3_1_.mWindowTitle as
mWindow11_33_2_, source3_1_.mManualUpdateMode as mManual12_33_2_,
source3_1_.mUpdateInterval as mUpdate13_33_2_, source3_2_.mURL as mURL34_2_,
source3_2_.mAudioDelay as mAudioDe3_34_2_, source3_2_.mAudioURL as
mAudioURL34_2_, source3_2_.mRemoteDesktopHost_mId as mRemoteD5_34_2_,
source3_3_.mURL as mURL35_2_, case when source3_1_.mId is not null then 1
when source3_2_.mId is not null then 2 when source3_3_.mId is not null then
3 when source3_.mId is not null then 0 end as clazz_2_, source4_.mId as
mId32_3_, source4_.mName as mName32_3_, source4_.mType as mType32_3_,
source4_.mTag as mTag32_3_, source4_.mDescription as mDescrip5_32_3_,
source4_.mOnline as mOnline32_3_, source4_.mAcknowledged as mAcknowl7_32_3_,
source4_.mAutoDetected as mAutoDet8_32_3_, source4_.mTimezone as
mTimezone32_3_, source4_.width as width32_3_, source4_.height as
height32_3_, source4_1_.mHost as mHost33_3_, source4_1_.mPassword as
mPassword33_3_, source4_1_.mPort as mPort33_3_, source4_1_.mTargetType as
mTargetT5_33_3_, source4_1_.mDesktopIdent as mDesktop6_33_3_, source4_1_.x
as x33_3_, source4_1_.y as y33_3_, source4_1_.width as width33_3_,
source4_1_.height as height33_3_, source4_1_.mWindowTitle as
mWindow11_33_3_, source4_1_.mManualUpdateMode as mManual12_33_3_,
source4_1_.mUpdateInterval as mUpdate13_33_3_, source4_2_.mURL as mURL34_3_,
source4_2_.mAudioDelay as mAudioDe3_34_3_, source4_2_.mAudioURL as
mAudioURL34_3_, source4_2_.mRemoteDesktopHost_mId as mRemoteD5_34_3_,
source4_3_.mURL as mURL35_3_, case when source4_1_.mId is not null then 1
when source4_2_.mId is not null then 2 when source4_3_.mId is not null then
3 when source4_.mId is not null then 0 end as clazz_3_, source5_.mId as
mId32_4_, source5_.mName as mName32_4_, source5_.mType as mType32_4_,
source5_.mTag as mTag32_4_, source5_.mDescription as mDescrip5_32_4_,
source5_.mOnline as mOnline32_4_, source5_.mAcknowledged as mAcknowl7_32_4_,
source5_.mAutoDetected as mAutoDet8_32_4_, source5_.mTimezone as
mTimezone32_4_, source5_.width as width32_4_, source5_.height as
height32_4_, source5_1_.mHost as mHost33_4_, source5_1_.mPassword as
mPassword33_4_, source5_1_.mPort as mPort33_4_, source5_1_.mTargetType as
mTargetT5_33_4_, source5_1_.mDesktopIdent as mDesktop6_33_4_, source5_1_.x
as x33_4_, source5_1_.y as y33_4_, source5_1_.width as width33_4_,
source5_1_.height as height33_4_, source5_1_.mWindowTitle as
mWindow11_33_4_, source5_1_.mManualUpdateMode as mManual12_33_4_,
source5_1_.mUpdateInterval as mUpdate13_33_4_, source5_2_.mURL as mURL34_4_,
source5_2_.mAudioDelay as mAudioDe3_34_4_, source5_2_.mAudioURL as
mAudioURL34_4_, source5_2_.mRemoteDesktopHost_mId as mRemoteD5_34_4_,
source5_3_.mURL as mURL35_4_, case when source5_1_.mId is not null then 1
when source5_2_.mId is not null then 2 when source5_3_.mId is not null then
3 when source5_.mId is not null then 0 end as clazz_4_ from
SquidModeConfiguration squidmodec0_ left outer join Source source1_ on
squidmodec0_.mLeftSource_mId=source1_.mId left outer join ScreenScrapeSource
source1_1_ on source1_.mId=source1_1_.mId left outer join VideoSource
source1_2_ on source1_.mId=source1_2_.mId left outer join WebSource
source1_3_ on source1_.mId=source1_3_.mId left outer join ScreenScrapeSource
screenscra2_ on source1_2_.mRemoteDesktopHost_mId=screenscra2_.mId left
outer join Source screenscra2_1_ on screenscra2_.mId=screenscra2_1_.mId left
outer join Source source3_ on squidmodec0_.mRightSource_mId=source3_.mId
left outer join ScreenScrapeSource source3_1_ on source3_.mId=source3_1_.mId
left outer join VideoSource source3_2_ on source3_.mId=source3_2_.mId left
outer join WebSource source3_3_ on source3_.mId=source3_3_.mId left outer
join Source source4_ on squidmodec0_.mTopSource_mId=source4_.mId left outer
join ScreenScrapeSource source4_1_ on source4_.mId=source4_1_.mId left outer
join VideoSource source4_2_ on source4_.mId=source4_2_.mId left outer join
WebSource source4_3_ on source4_.mId=source4_3_.mId left outer join Source
source5_ on squidmodec0_.mBottomSource_mId=source5_.mId left outer join
ScreenScrapeSource source5_1_ on source5_.mId=source5_1_.mId left outer join
VideoSource source5_2_ on source5_.mId=source5_2_.mId left outer join
WebSource source5_3_ on source5_.mId=source5_3_.mId where
squidmodec0_.mId=$1
2009-01-21 15:53:30 IST ERROR:  deadlock detected
2009-01-21 15:53:30 IST DETAIL:  Process 11632 waits for AccessExclusiveLock
on relation 156745 of database 16403; blocked by process 12832.
 Process 12832 waits for AccessShareLock on relation 156727 of database
16403; blocked by process 11632.
2009-01-21 15:53:30 IST STATEMENT:  TRUNCATE TABLE Source CASCADE
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "displet"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"screenscrapesource"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"squidmodeconfiguration"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "videosource"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "websource"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "decorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "display"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "application"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "audiodecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"borderdecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"display_snapshot"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "imagedecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "labeldecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"statusborderdecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "window"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"applicationwindow"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"datetimedecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "logodecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"perspectivewindow"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"snapshot_window"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"sourcenamedecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"statictextdecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"statusborderdecorator_linestyle"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"statusimagedecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"statuslabeldecorator"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "display"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "perspective"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "snapshot"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "application"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"display_snapshot"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "displet"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "message"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"perspectivewindow"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"snapshot_window"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "window"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table
"applicationwindow"
2009-01-21 15:54:57 IST NOTICE:  truncate cascades to table "decorator"

Reply via email to