Commit 35ecc244 authored by Simon Riggs's avatar Simon Riggs

Add new test files for lock level patch

parent cf376a4a
Parsed test spec with 2 sessions
starting permutation: s1a s1b s1c s2a s2b s2c s2d s2e s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s2c s2d s2e s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s1b s2a s2b s1c s2c s2d s2e s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s1c s2d s2e s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s2d s1c s2e s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s2d s2e s1c s2f
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s1b s2a s2b s2c s2d s2e s2f s1c
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s1c s2b s2c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s1b s2b s1c s2c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s1c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s2d s1c s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s2d s2e s1c s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s2b s2c s2d s2e s2f s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s1b s1c s2c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s1c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s2d s1c s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s2d s2e s1c s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s1b s2c s2d s2e s2f s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s1b s1c s2d s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s2b s2c s1b s2d s1c s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s1a s2a s2b s2c s1b s2d s2e s1c s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s1b s2d s2e s2f s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s2d s1b s1c s2e s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s2d s1b s2e s1c s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
invalid permutation detected
starting permutation: s1a s2a s2b s2c s2d s1b s2e s2f s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s1a s2a s2b s2c s2d s2e s1b s1c s2f
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s2d s2e s1b s2f s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s1a s2a s2b s2c s2d s2e s2f s1b s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s2c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s1b s2b s1c s2c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s1c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s2d s1c s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s2d s2e s1c s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s1b s2b s2c s2d s2e s2f s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s1b s1c s2c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s1c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s2d s1c s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s2d s2e s1c s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s1b s2c s2d s2e s2f s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s1b s1c s2d s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s2b s2c s1b s2d s1c s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s1a s2b s2c s1b s2d s2e s1c s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s1b s2d s2e s2f s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s2d s1b s1c s2e s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s2d s1b s2e s1c s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
invalid permutation detected
starting permutation: s2a s1a s2b s2c s2d s1b s2e s2f s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s1a s2b s2c s2d s2e s1b s1c s2f
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s1a s2b s2c s2d s2e s2f s1b s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s2d s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c s2d s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s2d s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s2d s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s1b s2c s2d s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s1b s1c s2d s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s2d s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s2d s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s1b s2d s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s2d s1b s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s2d s1b s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
invalid permutation detected
starting permutation: s2a s2b s1a s2c s2d s1b s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s2e s1b s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s2d s2e s1b s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s2e s2f s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s2d s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s2d s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
step s1c: COMMIT;
step s2d: <... completed>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s2d s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s1a s1b s2d s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s2d: INSERT INTO b VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s1a s2d s1b s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s1a s2d s1b s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
invalid permutation detected
starting permutation: s2a s2b s2c s1a s2d s1b s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s2e s1b s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s1a s2d s2e s1b s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s2e s2f s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s1a: BEGIN;
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s1b s1c s2e s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s2d s1a s1b s2e s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
invalid permutation detected
starting permutation: s2a s2b s2c s2d s1a s1b s2e s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s2e s1b s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s2d s1a s2e s1b s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s2e: INSERT INTO a VALUES (4);
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s2e s2f s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s1a: BEGIN;
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s2e s1a s1b s1c s2f
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s2d s2e s1a s1b s2f s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
step s2f: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s2e s1a s2f s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s1a: BEGIN;
step s2f: COMMIT;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s2e s2f s1a s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
a_id
3
step s2d: INSERT INTO b VALUES (0);
step s2e: INSERT INTO a VALUES (4);
step s2f: COMMIT;
step s1a: BEGIN;
step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
step s1c: COMMIT;
Parsed test spec with 2 sessions
starting permutation: s1a s1b s1c s1d s2a s2b s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s1c s2a s1d s2b s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s1c s2a s2b s1d s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s1c s2a s2b s2c s1d s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s1c s2a s2b s2c s2d s1d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s1b s2a s1c s1d s2b s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s1d s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s2c s1d s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s2c s2d s1d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s1b s2a s2b s1c s1d s2c s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s1c s2c s1d s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s1c s2c s2d s1d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s1b s2a s2b s2c s1c s1d s2d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s1c s2d s1d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s1a s1b s2a s2b s2c s2d s1c s1d
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s1c s1d s2b s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s1c s2b s1d s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s1c s2b s2c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s1c s2b s2c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s2b s1c s1d s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s1c s2c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s1c s2c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s2b s2c s1c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s1c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s1a s2a s1b s2b s2c s2d s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s1b s1c s1d s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s2b s1b s1c s2c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s2b s1b s1c s2c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s1b s2c s1c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s1c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s1a s2a s2b s1b s2c s2d s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s1b s1c s1d s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2d: COMMIT;
starting permutation: s1a s2a s2b s2c s1b s1c s2d s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2d: COMMIT;
step s1d: COMMIT;
starting permutation: s1a s2a s2b s2c s1b s2d s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2d: COMMIT;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s1a s2a s2b s2c s2d s1b s1c s1d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s1a s1b s1c s1d s2b s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s1d s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s2c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s2c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s1b s2b s1c s1d s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s1c s2c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s1c s2c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s1b s2b s2c s1c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s1c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s2a s1a s1b s2b s2c s2d s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s1b s1c s1d s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s2b s1b s1c s2c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s2b s1b s1c s2c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s1b s2c s1c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s1c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s2a s1a s2b s1b s2c s2d s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s1b s1c s1d s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2d: COMMIT;
starting permutation: s2a s1a s2b s2c s1b s1c s2d s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2d: COMMIT;
step s1d: COMMIT;
starting permutation: s2a s1a s2b s2c s1b s2d s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2d: COMMIT;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s1a s2b s2c s2d s1b s1c s1d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s1d s2c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s1b s2c s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2c: <... completed>
error in steps s1d s2c: ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
step s1c: ALTER TABLE a ENABLE TRIGGER t;
invalid permutation detected
starting permutation: s2a s2b s1a s1b s2c s2d s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2c: INSERT INTO a VALUES (0); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s1b s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s1c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2d: COMMIT;
step s1d: COMMIT;
starting permutation: s2a s2b s1a s2c s1b s2d s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2d: COMMIT;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s1d s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
step s2d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s2d s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s2d: COMMIT;
step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s2d s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s2d: COMMIT;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s1a: BEGIN;
step s2d: COMMIT;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s1b s1c s1d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
i
1
step s2c: INSERT INTO a VALUES (0);
ERROR: duplicate key value violates unique constraint "a_pkey"
step s2d: COMMIT;
step s1a: BEGIN;
step s1b: ALTER TABLE a DISABLE TRIGGER t;
step s1c: ALTER TABLE a ENABLE TRIGGER t;
step s1d: COMMIT;
Parsed test spec with 2 sessions
starting permutation: s1a s1b s1c s2a s2b s2c s2d
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s1b s2a s1c s2b s2c s2d
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s1c s2c s2d
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s1c s2d
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s1a s1b s2a s2b s2c s2d s1c
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s1b s1c s2b s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s1c s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s1c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s1a s2a s1b s2b s2c s2d s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s1b s1c s2c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s1c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s1a s2a s2b s1b s2c s2d s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s1b s1c s2d
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
invalid permutation detected
starting permutation: s1a s2a s2b s2c s1b s2d s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s1a s2a s2b s2c s2d s1b s1c
step s1a: BEGIN;
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
starting permutation: s2a s1a s1b s1c s2b s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s1c s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s1c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s2a s1a s1b s2b s2c s2d s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s1b s1c s2c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s1c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s2a s1a s2b s1b s2c s2d s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s1b s1c s2d
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
invalid permutation detected
starting permutation: s2a s1a s2b s2c s1b s2d s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s1a s2b s2c s2d s1b s1c
step s2a: BEGIN;
step s1a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
starting permutation: s2a s2b s1a s1b s1c s2c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s1c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
step s1c: COMMIT;
step s2c: <... completed>
step s2d: COMMIT;
starting permutation: s2a s2b s1a s1b s2c s2d s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s1b s1c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s1a s2c s1b s2d s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s1a s2c s2d s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s1a: BEGIN;
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s1b s1c s2d
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
invalid permutation detected
starting permutation: s2a s2b s2c s1a s1b s2d s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...>
step s2d: COMMIT;
step s1b: <... completed>
step s1c: COMMIT;
starting permutation: s2a s2b s2c s1a s2d s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s1a: BEGIN;
step s2d: COMMIT;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
starting permutation: s2a s2b s2c s2d s1a s1b s1c
step s2a: BEGIN;
step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE;
i
1
step s2c: UPDATE a SET i = 4 WHERE i = 3;
step s2d: COMMIT;
step s1a: BEGIN;
step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
step s1c: COMMIT;
# ALTER TABLE - Add foreign keys with concurrent reads
#
# ADD CONSTRAINT uses ShareRowExclusiveLock so we mix writes with it
# to see what works or waits.
setup
{
CREATE TABLE a (i int PRIMARY KEY);
CREATE TABLE b (a_id int);
INSERT INTO a VALUES (0), (1), (2), (3);
INSERT INTO b SELECT generate_series(1,1000) % 4;
}
teardown
{
DROP TABLE a, b;
}
session "s1"
step "s1a" { BEGIN; }
step "s1b" { ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; }
step "s1c" { COMMIT; }
session "s2"
step "s2a" { BEGIN; }
step "s2b" { SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; }
step "s2c" { SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; }
step "s2d" { INSERT INTO b VALUES (0); }
step "s2e" { INSERT INTO a VALUES (4); }
step "s2f" { COMMIT; }
# ALTER TABLE - Enable and disable triggers with concurrent reads
#
# ENABLE/DISABLE TRIGGER uses ShareRowExclusiveLock so we mix writes with
# it to see what works or waits.
setup
{
CREATE TABLE a (i int PRIMARY KEY);
INSERT INTO a VALUES (0), (1), (2), (3);
CREATE FUNCTION f() RETURNS TRIGGER LANGUAGE plpgsql AS 'BEGIN RETURN NULL; END;';
CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f();
}
teardown
{
DROP TABLE a;
DROP FUNCTION f();
}
session "s1"
step "s1a" { BEGIN; }
step "s1b" { ALTER TABLE a DISABLE TRIGGER t; }
step "s1c" { ALTER TABLE a ENABLE TRIGGER t; }
step "s1d" { COMMIT; }
session "s2"
step "s2a" { BEGIN; }
step "s2b" { SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; }
step "s2c" { INSERT INTO a VALUES (0); }
step "s2d" { COMMIT; }
# CREATE TRIGGER - Add trigger with concurrent reads
#
# CREATE TRIGGER uses ShareRowExclusiveLock so we mix writes with it
# to see what works or waits.
setup
{
CREATE TABLE a (i int);
CREATE FUNCTION f() RETURNS TRIGGER LANGUAGE plpgsql AS 'BEGIN RETURN NULL; END;';
INSERT INTO a VALUES (0), (1), (2), (3);
}
teardown
{
DROP TABLE a;
DROP FUNCTION f();
}
session "s1"
step "s1a" { BEGIN; }
step "s1b" { CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); }
step "s1c" { COMMIT; }
session "s2"
step "s2a" { BEGIN; }
step "s2b" { SELECT * FROM a WHERE i = 1 FOR UPDATE; }
step "s2c" { UPDATE a SET i = 4 WHERE i = 3; }
step "s2d" { COMMIT; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment