In our application two activites are running concurrent-
- Bulk updates activity
- Transactional activity
When both these activites are perfomed on same record cocurrently we see invalid values.
To prevent this I am thinking of using pessimistic locking(Postgres row level lock). But the issue here is I may have to lock all records for bulk updates.