blob: f054de5ed930222b85f77631e04e245c01648bc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Parsed test spec with 3 sessions
starting permutation: s1u s2donothing s3donothing s1c s2c s3select s3c
step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1;
step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...>
step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing') ON CONFLICT DO NOTHING; <waiting ...>
step s1c: COMMIT;
step s2donothing: <... completed>
step s3donothing: <... completed>
step s2c: COMMIT;
step s3select: SELECT * FROM foo ORDER BY a;
a|b
-+-----------------------------------
1|session-2 donothing
2|initial tuple -> moved by session-1
(2 rows)
step s3c: COMMIT;
starting permutation: s2donothing s1u s3donothing s1c s2c s3select s3c
step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING;
step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1;
step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing') ON CONFLICT DO NOTHING; <waiting ...>
step s1c: COMMIT;
step s3donothing: <... completed>
step s2c: COMMIT;
step s3select: SELECT * FROM foo ORDER BY a;
a|b
-+-----------------------------------
2|initial tuple -> moved by session-1
(1 row)
step s3c: COMMIT;
|