forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5174206
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 parent7ced1b6 commit5174206
File tree
4 files changed
+537
-2
lines changed- src
- backend/access/heap
- test/isolation
- expected
- specs
4 files changed
+537
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6111 | 6111 | | |
6112 | 6112 | | |
6113 | 6113 | | |
| 6114 | + | |
6114 | 6115 | | |
6115 | 6116 | | |
6116 | 6117 | | |
| |||
6121 | 6122 | | |
6122 | 6123 | | |
6123 | 6124 | | |
6124 | | - | |
| 6125 | + | |
6125 | 6126 | | |
6126 | 6127 | | |
| 6128 | + | |
6127 | 6129 | | |
6128 | | - | |
| 6130 | + | |
6129 | 6131 | | |
6130 | 6132 | | |
6131 | 6133 | | |
| |||
0 commit comments
Comments
(0)