Forum .LRN Q&A: Response to Forums and Notifications deleting threads problem in postgresql

I can't look into this further at the moment, but here's some food for thought. Perhaps the answer can be found in the fact that notification::request::delete_all takes an object_id as its argument, but in the errors we see, it's the foreign key constraint on the response_id column that is causing the problem.