mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Add expected regress output on stricter isolation levels
These new files allow the new FK tests on isolationtester to pass on the serializable and repeatable read isolation levels (which are untested by the buildfarm). Author: Kevin Grittner Reviewed by Noah Misch
This commit is contained in:
parent
7cb7122800
commit
a0eae1a2ee
110
src/test/isolation/expected/fk-deadlock2_1.out
Normal file
110
src/test/isolation/expected/fk-deadlock2_1.out
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
Parsed test spec with 2 sessions
|
||||||
|
|
||||||
|
starting permutation: s1u1 s1u2 s1c s2u1 s2u2 s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s1u2 s2u1 s1c s2u2 s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2u1: <... completed>
|
||||||
|
ERROR: could not serialize access due to concurrent update
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s1u2 s2u2 s1c s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s1u2 s2u2 s2c s1c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s2u2 s1u2 s1c s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s2u2 s1u2 s2c s1c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s1u2 s2u2 s1c s2c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s1u2 s2u2 s2c s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s2u2 s1u2 s1c s2c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s2u2 s1u2 s2c s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s2u2 s1u1 s2c s1u2 s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; <waiting ...>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1u1: <... completed>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: could not serialize access due to read/write dependencies among transactions
|
||||||
|
step s1c: COMMIT;
|
110
src/test/isolation/expected/fk-deadlock2_2.out
Normal file
110
src/test/isolation/expected/fk-deadlock2_2.out
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
Parsed test spec with 2 sessions
|
||||||
|
|
||||||
|
starting permutation: s1u1 s1u2 s1c s2u1 s2u2 s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s1u2 s2u1 s1c s2u2 s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2u1: <... completed>
|
||||||
|
ERROR: could not serialize access due to concurrent update
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s1u2 s2u2 s1c s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s1u2 s2u2 s2c s1c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s2u2 s1u2 s1c s2c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1u1 s2u1 s2u2 s1u2 s2c s1c
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s1u2 s2u2 s1c s2c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s1u2 s2u2 s2c s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u2: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s2u2 s1u2 s1c s2c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s1u1 s2u2 s1u2 s2c s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u2: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2u1 s2u2 s1u1 s2c s1u2 s1c
|
||||||
|
step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; <waiting ...>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1u1: <... completed>
|
||||||
|
step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
|
||||||
|
ERROR: could not serialize access due to concurrent update
|
||||||
|
step s1c: COMMIT;
|
71
src/test/isolation/expected/fk-deadlock_1.out
Normal file
71
src/test/isolation/expected/fk-deadlock_1.out
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
Parsed test spec with 2 sessions
|
||||||
|
|
||||||
|
starting permutation: s1i s1u s1c s2i s2u s2c
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar';
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz';
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1i s1u s2i s1c s2u s2c
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar';
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1); <waiting ...>
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2i: <... completed>
|
||||||
|
ERROR: could not serialize access due to concurrent update
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz';
|
||||||
|
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1i s2i s1u s2u s1c s2c
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz';
|
||||||
|
step s1u: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s1i s2i s2u s1u s2c s1c
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar';
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2i s1i s1u s2u s1c s2c
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz';
|
||||||
|
step s1u: <... completed>
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s1c: COMMIT;
|
||||||
|
step s2c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2i s1i s2u s1u s2c s1c
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1);
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar';
|
||||||
|
ERROR: deadlock detected
|
||||||
|
step s2u: <... completed>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1c: COMMIT;
|
||||||
|
|
||||||
|
starting permutation: s2i s2u s1i s2c s1u s1c
|
||||||
|
step s2i: INSERT INTO child VALUES (2, 1);
|
||||||
|
step s2u: UPDATE parent SET aux = 'baz';
|
||||||
|
step s1i: INSERT INTO child VALUES (1, 1); <waiting ...>
|
||||||
|
step s2c: COMMIT;
|
||||||
|
step s1i: <... completed>
|
||||||
|
ERROR: could not serialize access due to concurrent update
|
||||||
|
step s1u: UPDATE parent SET aux = 'bar';
|
||||||
|
ERROR: current transaction is aborted, commands ignored until end of transaction block
|
||||||
|
step s1c: COMMIT;
|
Loading…
Reference in New Issue
Block a user