- Notifications
You must be signed in to change notification settings - Fork5
Commitd5e3d1e
committed
Fix thinko in lock mode enum
Commit0e5680f contained a thinkomixing LOCKMODE with LockTupleMode. This caused misbehavior in the casewhere a tuple is marked with a multixact with at most a FOR SHARE lock,and another transaction tries to acquire a FOR NO KEY EXCLUSIVE lock;this case should block but doesn't.Include a new isolation tester spec file to explicitely try all thetuple lock combinations; without the fix it shows the problem: starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock3 s1_commit step s1_begin: BEGIN; step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; a 1 step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; a 1 step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; a 1 step s1_commit: COMMIT;With the fixed code, step s2_tuplock3 blocks until session 1 commits,which is the correct behavior.All other cases behave correctly.Backpatch to 9.3, like the commit that introduced the problem.1 parent2ea9595 commitd5e3d1e
File tree
4 files changed
+537
-2
lines changed- src
- backend/access/heap
- test/isolation
- expected
- specs
4 files changed
+537
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6102 | 6102 |
| |
6103 | 6103 |
| |
6104 | 6104 |
| |
| 6105 | + | |
6105 | 6106 |
| |
6106 | 6107 |
| |
6107 | 6108 |
| |
| |||
6113 | 6114 |
| |
6114 | 6115 |
| |
6115 | 6116 |
| |
6116 |
| - | |
| 6117 | + | |
6117 | 6118 |
| |
6118 | 6119 |
| |
| 6120 | + | |
6119 | 6121 |
| |
6120 |
| - | |
| 6122 | + | |
6121 | 6123 |
| |
6122 | 6124 |
| |
6123 | 6125 |
| |
|
0 commit comments
Comments
(0)