oh no, not again. Which application caused this?
Your examples show deadlocks on
- insert into acs_object_context_index
triggered from
- acs_rel__new, membership_rel__new, and
- contact_party_revision__new, content_revision__new, and
- content_folder__new, content_item__new
For performance reasons, we do not want to lock the most inner part (acs_objects, acs_object_context_index), but the higher level operations. We have locks already for content_item_new and content_revsion_new, but only on the tcl level. In your cases 2 and 3, the stored procedures are called directly from other stored procedures.
Please, do the following: add
LOCK TABLE acs_objects IN SHARE ROW EXCLUSIVE MODE
to the stored procedures content_revision__new, content_item__new and acs_rel__new, and delete the locks from tcl. This should not hurt performance to much and your problem should go away.