EDIT: add example data
parent_table:
-------------
id
1
2
child_table:
------------
parent_id | col_1 | ...
1 | "A" | ...
2 | "A" | ...
...
2 threads:
1st thread is `DELETE FROM parent_table where id = 1`
2nd thread is `DELETE FROM parent_table where id = 2`
child_table has:
- composite primary key of (parent_id, col_1)
- fk
parent_id
references parent_table withON DELETE CASCADE