Parsed test spec with 3 sessions
|
|
starting permutation: s2b s2ukey s1b s1i s2c s1c s2s s1s
|
step s2b: BEGIN;
|
step s2ukey: UPDATE parent SET parent_key = 2 WHERE parent_key = 1;
|
step s1b: BEGIN;
|
step s1i: INSERT INTO child VALUES (1, 1); <waiting ...>
|
step s2c: COMMIT;
|
step s1i: <... completed>
|
ERROR: insert or update on table "child" violates foreign key constraint "child_parent_key_fkey"
|
step s1c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
2|foo
|
(1 row)
|
|
step s1s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
(0 rows)
|
|
|
starting permutation: s2b s2uaux s1b s1i s2c s1c s2s s1s
|
step s2b: BEGIN;
|
step s2uaux: UPDATE parent SET aux = 'bar' WHERE parent_key = 1;
|
step s1b: BEGIN;
|
step s1i: INSERT INTO child VALUES (1, 1);
|
step s2c: COMMIT;
|
step s1c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
1|bar
|
(1 row)
|
|
step s1s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
1| 1
|
(1 row)
|
|
|
starting permutation: s2b s2ukey s1b s1i s2ukey2 s2c s1c s2s s1s
|
step s2b: BEGIN;
|
step s2ukey: UPDATE parent SET parent_key = 2 WHERE parent_key = 1;
|
step s1b: BEGIN;
|
step s1i: INSERT INTO child VALUES (1, 1); <waiting ...>
|
step s2ukey2: UPDATE parent SET parent_key = 1 WHERE parent_key = 2;
|
step s2c: COMMIT;
|
step s1i: <... completed>
|
step s1c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
1|foo
|
(1 row)
|
|
step s1s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
1| 1
|
(1 row)
|
|
|
starting permutation: s2b s2ukey s3b s3i s2c s3c s2s s3s
|
step s2b: BEGIN;
|
step s2ukey: UPDATE parent SET parent_key = 2 WHERE parent_key = 1;
|
step s3b: BEGIN ISOLATION LEVEL REPEATABLE READ;
|
step s3i: INSERT INTO child VALUES (2, 1); <waiting ...>
|
step s2c: COMMIT;
|
step s3i: <... completed>
|
ERROR: could not serialize access due to concurrent update
|
step s3c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
2|foo
|
(1 row)
|
|
step s3s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
(0 rows)
|
|
|
starting permutation: s2b s2dkey s3b s3i s2c s3c s2s s3s
|
step s2b: BEGIN;
|
step s2dkey: DELETE FROM parent WHERE parent_key = 1;
|
step s3b: BEGIN ISOLATION LEVEL REPEATABLE READ;
|
step s3i: INSERT INTO child VALUES (2, 1); <waiting ...>
|
step s2c: COMMIT;
|
step s3i: <... completed>
|
ERROR: could not serialize access due to concurrent delete
|
step s3c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
(0 rows)
|
|
step s3s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
(0 rows)
|
|
|
starting permutation: s2b s2uaux s3b s3i s2c s3c s2s s3s
|
step s2b: BEGIN;
|
step s2uaux: UPDATE parent SET aux = 'bar' WHERE parent_key = 1;
|
step s3b: BEGIN ISOLATION LEVEL REPEATABLE READ;
|
step s3i: INSERT INTO child VALUES (2, 1);
|
step s2c: COMMIT;
|
step s3c: COMMIT;
|
step s2s: SELECT * FROM parent;
|
parent_key|aux
|
----------+---
|
1|bar
|
(1 row)
|
|
step s3s: SELECT * FROM child;
|
child_key|parent_key
|
---------+----------
|
2| 1
|
(1 row)
|