forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54a8abc
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 parenta68b8ae commit54a8abc
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 | |
---|---|---|---|
| |||
5924 | 5924 |
| |
5925 | 5925 |
| |
5926 | 5926 |
| |
| 5927 | + | |
5927 | 5928 |
| |
5928 | 5929 |
| |
5929 | 5930 |
| |
| |||
5934 | 5935 |
| |
5935 | 5936 |
| |
5936 | 5937 |
| |
5937 |
| - | |
| 5938 | + | |
5938 | 5939 |
| |
5939 | 5940 |
| |
| 5941 | + | |
5940 | 5942 |
| |
5941 |
| - | |
| 5943 | + | |
5942 | 5944 |
| |
5943 | 5945 |
| |
5944 | 5946 |
| |
|
0 commit comments
Comments
(0)