This patch did not do the trick in my testing. Attempts to delete *some* patrons still times out in the client.
Here's an EXPLAIN ANALYZE for one such patron subsequent to applying the patch :
EXPLAIN ANALYZE delete from action.circulation where usr = 2082592;
QUERY PLAN -------------------------------------------------------------------------------------------------------- Delete on circulation (cost=0.44..951.43 rows=481 width=6) (actual time=532.420..532.420 rows=0 loops=1) -> Index Scan using circ_all_usr_idx on circulation (cost=0.44..951.43 rows=481 width=6) (actual time=0.234..19.172 rows=1313 loops=1) Index Cond: (usr = 2082592) Planning time: 1.751 ms Trigger for constraint circulation_limit_group_map_circ_fkey: time=59.308 calls=1261 Trigger for constraint usr_circ_history_source_circ_fkey: time=156220.717 calls=1261 Trigger action_circulation_aging_tgr: time=505.381 calls=1313 Trigger age_parent_circ: time=6492.583 calls=1261 Trigger mat_summary_remove_tgr: time=133.659 calls=1261 Execution time: 163442.200 ms (10 rows)
It is interesting to note that this patron has zero rows in action.usr_circ_history.
Leaving the pullrequest tag in place and would welcome other testers.
This patch did not do the trick in my testing. Attempts to delete *some* patrons still times out in the client.
Here's an EXPLAIN ANALYZE for one such patron subsequent to applying the patch :
EXPLAIN ANALYZE delete from action.circulation where usr = 2082592;
-------
Delete on circulation (cost=0.44..951.43 rows=481 width=6) (actual time=532.
-> Index Scan using circ_all_usr_idx on circulation (cost=0.44..951.43 rows=481 width=6) (actual time=0.234..19.172 rows=1313 loops=1)
Index Cond: (usr = 2082592)
Planning time: 1.751 ms
Trigger for constraint circulation_
Trigger for constraint usr_circ_
Trigger action_
Trigger age_parent_circ: time=6492.583 calls=1261
Trigger mat_summary_
Execution time: 163442.200 ms
(10 rows)
It is interesting to note that this patron has zero rows in action. usr_circ_ history.
Leaving the pullrequest tag in place and would welcome other testers.