Commit fa12184
committed
[IMP] shopfloor_base: Allow changing the way locks are acquired
This commit adds two new system parameters:
* shopfloor.lock.for_update.no_key: Can be defined with a True-ish
value to use FOR NO KEY UPDATE in the select to acquire a lock on
selected rows
* shopfloor.lock.for_update.no_wait: Can be defined with a True-ish
value to use NOWAIT and raise an error instead of waiting for the
lock to be acquired.
Note that NOWAIT keyword cannot be use in conjunction with SKIP LOCKED,
hence, if skip_locked arg is used, the value of no_wait parameter
will be ignored.1 parent 5e3c4da commit fa12184
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
| 57 | + | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
| |||
0 commit comments