aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-01-04 15:48:29 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-01-04 15:48:29 -0300
commit54a8abc2b7d150ae7e2738f4b0e687fd9cd9011a (patch)
tree1eae0518fe601c6cdf01624d05b874a748c9f8b0 /src/tutorial/funcs.c
parenta68b8aec71c8ab0aefe9888041172d1482c7d276 (diff)
downloadpostgresql-54a8abc2b7d150ae7e2738f4b0e687fd9cd9011a.tar.gz
postgresql-54a8abc2b7d150ae7e2738f4b0e687fd9cd9011a.zip
Fix thinko in lock mode enum
Commit 0e5680f4737a9c6aa94aa9e77543e5de60411322 contained a thinko mixing LOCKMODE with LockTupleMode. This caused misbehavior in the case where 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 the tuple 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.
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions