Skip to content

Commit

Permalink
Subselects for queries that modify the selected row need to use FOR U…
Browse files Browse the repository at this point in the history
…PDATE (closes #90)
  • Loading branch information
kraih committed Dec 16, 2019
1 parent 17868bd commit a9a00ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

10.01 2019-11-16
10.01 2019-12-16
- Fixed an unlock concurrency issue in Minion::Backend::Pg.

10.0 2019-11-15
- Removed PostgreSQL migrations older than 2 years, that means you need to
Expand Down
2 changes: 1 addition & 1 deletion lib/Minion/Backend/Pg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ sub unlock {
!!shift->pg->db->query(
'delete from minion_locks where id = (
select id from minion_locks
where expires > now() and name = ? order by expires limit 1
where expires > now() and name = ? order by expires limit 1 for update
) returning 1', shift
)->rows;
}
Expand Down

0 comments on commit a9a00ff

Please sign in to comment.