Forum OpenACS Development: Strange problem deleting a CR item (oacs-5.1 and PG 7.4)

A client of mine is running an old customized version of our ERP, which did make use of the CR, unlike the new version.

Overall the performances are quite good, except when deleting a CR item (i.e. an order line) which lasts forever (~80 sec).

Executing the function 'select content_item__delete' within a psql shell, I can observe the quick output of various 'raise notice' except the last call to 'acs_object__delete'.

I then added some 'raise notice' also to 'acs_object__delete' noticing that the time consuming operation is the last one, that deleting the row from acs_objects.

As far as I know there is only one trigger. deleting rows from acs_object_context_index, associated with the deletion of an acs object and I don't see any reason why this should last so much.