From 1a68b9933cbe36eb6869d0841eccffea96973187 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Fri, 14 Aug 2015 18:47:09 -0400
Subject: [PATCH 2/3] Specify permutations for isolation tests with "invalid"
 permutations.

---
 src/test/isolation/expected/aborted-keyrevoke.out  |   60 -
 .../isolation/expected/aborted-keyrevoke_2.out     |   60 -
 src/test/isolation/expected/alter-table-1.out      | 1304 +++-----------------
 src/test/isolation/expected/alter-table-2.out      |  551 ---------
 src/test/isolation/expected/alter-table-3.out      |  258 ----
 src/test/isolation/expected/create-trigger.out     |  110 --
 .../isolation/expected/delete-abort-savept.out     |  132 --
 src/test/isolation/expected/fk-deadlock.out        |   42 -
 src/test/isolation/expected/fk-deadlock2.out       |   59 -
 src/test/isolation/expected/fk-deadlock2_1.out     |   59 -
 src/test/isolation/expected/fk-deadlock2_2.out     |   59 -
 src/test/isolation/expected/fk-deadlock_1.out      |   42 -
 src/test/isolation/specs/aborted-keyrevoke.spec    |   15 +
 src/test/isolation/specs/alter-table-1.spec        |  138 +++
 src/test/isolation/specs/alter-table-2.spec        |   49 +
 src/test/isolation/specs/alter-table-3.spec        |   49 +
 src/test/isolation/specs/create-trigger.spec       |   26 +
 src/test/isolation/specs/delete-abort-savept.spec  |    8 +
 src/test/isolation/specs/fk-deadlock.spec          |   15 +
 src/test/isolation/specs/fk-deadlock2.spec         |   12 +
 20 files changed, 515 insertions(+), 2533 deletions(-)

diff --git a/src/test/isolation/expected/aborted-keyrevoke.out b/src/test/isolation/expected/aborted-keyrevoke.out
index 8850614..c937623 100644
--- a/src/test/isolation/expected/aborted-keyrevoke.out
+++ b/src/test/isolation/expected/aborted-keyrevoke.out
@@ -138,39 +138,6 @@ key            value
 1              1              
 step s1c: COMMIT;
 
-starting permutation: s1s s1u s2l s2c s1r s1l s1c
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2;
-step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s1l s1c s2c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s1l s2c s1c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s2c s1l s1c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1s s2l s1u s2c s1r s1l s1c
 step s1s: SAVEPOINT f;
 step s2l: SELECT * FROM foo FOR KEY SHARE;
@@ -202,33 +169,6 @@ key            value
 1              1              
 step s1c: COMMIT;
 
-starting permutation: s2l s1s s1u s1r s1l s1c s2c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1s s1u s1r s1l s2c s1c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1s s1u s1r s2c s1l s1c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2l s1s s1u s2c s1r s1l s1c
 step s2l: SELECT * FROM foo FOR KEY SHARE;
 key            value          
diff --git a/src/test/isolation/expected/aborted-keyrevoke_2.out b/src/test/isolation/expected/aborted-keyrevoke_2.out
index 85f6ccb..c286964 100644
--- a/src/test/isolation/expected/aborted-keyrevoke_2.out
+++ b/src/test/isolation/expected/aborted-keyrevoke_2.out
@@ -138,39 +138,6 @@ key            value
 1              1              
 step s1c: COMMIT;
 
-starting permutation: s1s s1u s2l s2c s1r s1l s1c
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2;
-step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s1l s1c s2c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s1l s2c s1c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1s s2l s1u s1r s2c s1l s1c
-step s1s: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1s s2l s1u s2c s1r s1l s1c
 step s1s: SAVEPOINT f;
 step s2l: SELECT * FROM foo FOR KEY SHARE;
@@ -203,33 +170,6 @@ key            value
 1              1              
 step s1c: COMMIT;
 
-starting permutation: s2l s1s s1u s1r s1l s1c s2c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1s s1u s1r s1l s2c s1c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1s s1u s1r s2c s1l s1c
-step s2l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1s: SAVEPOINT f;
-step s1u: UPDATE foo SET key = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2l s1s s1u s2c s1r s1l s1c
 step s2l: SELECT * FROM foo FOR KEY SHARE;
 key            value          
diff --git a/src/test/isolation/expected/alter-table-1.out b/src/test/isolation/expected/alter-table-1.out
index 61812e6..dd5d8b1 100644
--- a/src/test/isolation/expected/alter-table-1.out
+++ b/src/test/isolation/expected/alter-table-1.out
@@ -1310,56 +1310,6 @@ step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: s1 at1 rx1 wx rx3 sc1 s2 at2 sc2 c2
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 at1 rx1 wx rx3 sc1 s2 at2 c2 sc2
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 at1 rx1 wx rx3 sc1 s2 c2 at2 sc2
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 at1 rx1 wx rx3 sc1 c2 s2 at2 sc2
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 at1 rx1 wx rx3 c2 sc1 s2 at2 sc2
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
 starting permutation: s1 rx1 at1 sc1 s2 at2 sc2 wx rx3 c2
 step s1: BEGIN;
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
@@ -1970,57 +1920,7 @@ step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: s1 rx1 at1 wx rx3 sc1 s2 at2 sc2 c2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 at1 wx rx3 sc1 s2 at2 c2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 at1 wx rx3 sc1 s2 c2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 at1 wx rx3 sc1 c2 s2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 at1 wx rx3 c2 sc1 s2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 s2 at2 sc2 rx3 c2
+starting permutation: s1 rx1 wx at1 rx3 c2 sc1 s2 at2 sc2
 step s1: BEGIN;
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
@@ -2028,205 +1928,209 @@ a_id
 1              
 step wx: INSERT INTO b VALUES (0);
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 s2 at2 rx3 sc2 c2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
+step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
-1              
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+3              
+3              
+3              
+step c2: COMMIT;
+step at1: <... completed>
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 sc1 s2 at2 rx3 c2 sc2
+starting permutation: s1 rx1 wx rx3 at1 c2 sc1 s2 at2 sc2
 step s1: BEGIN;
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 s2 rx3 at2 sc2 c2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
+step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
-1              
-step wx: INSERT INTO b VALUES (0);
+3              
+3              
+3              
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+step c2: COMMIT;
+step at1: <... completed>
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 sc1 s2 rx3 at2 c2 sc2
+starting permutation: s1 rx1 wx rx3 c2 at1 sc1 s2 at2 sc2
 step s1: BEGIN;
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 s2 rx3 c2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
+step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
-1              
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+3              
+3              
+3              
+step c2: COMMIT;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 sc1 rx3 s2 at2 sc2 c2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 at2 sc2 wx rx3 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 rx3 s2 at2 c2 sc2
 step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 sc1 rx3 s2 c2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
+step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
-1              
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+3              
+3              
+3              
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 sc1 rx3 c2 s2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 at2 wx sc2 rx3 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx at1 rx3 sc1 s2 at2 sc2 c2
 step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step sc2: COMMIT;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-invalid permutation detected
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 rx3 sc1 s2 at2 c2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-invalid permutation detected
+step sc2: COMMIT;
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 rx3 sc1 s2 c2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-invalid permutation detected
+step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 rx3 sc1 c2 s2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx at2 sc2 rx3 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-invalid permutation detected
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx at1 rx3 c2 sc1 s2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx rx3 at1 sc1 s2 at2 sc2 c2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx rx3 at1 sc1 s2 at2 c2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2234,15 +2138,19 @@ a_id
 3              
 3              
 3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
+step c2: COMMIT;
 
-starting permutation: s1 rx1 wx rx3 at1 sc1 s2 c2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2250,52 +2158,19 @@ a_id
 3              
 3              
 3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: s1 rx1 wx rx3 at1 sc1 c2 s2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1 rx1 wx rx3 at1 c2 sc1 s2 at2 sc2
-step s1: BEGIN;
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: s1 rx1 wx rx3 c2 at1 sc1 s2 at2 sc2
-step s1: BEGIN;
+starting permutation: rx1 s1 at1 sc1 s2 wx rx3 c2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step s1: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
+step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2304,13 +2179,10 @@ a_id
 3              
 3              
 step c2: COMMIT;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step sc1: COMMIT;
-step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 at2 sc2 wx rx3 c2
+starting permutation: rx1 s1 at1 sc1 wx s2 at2 sc2 rx3 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2318,10 +2190,10 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
+step wx: INSERT INTO b VALUES (0);
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
-step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2330,7 +2202,7 @@ a_id
 3              
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 at2 wx sc2 rx3 c2
+starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2338,19 +2210,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
+step wx: INSERT INTO b VALUES (0);
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step wx: INSERT INTO b VALUES (0);
-step sc2: COMMIT;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
+step sc2: COMMIT;
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 sc2 c2
+starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2358,19 +2230,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
+step wx: INSERT INTO b VALUES (0);
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step sc2: COMMIT;
 step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 c2 sc2
+starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2378,19 +2250,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step wx: INSERT INTO b VALUES (0);
+step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step c2: COMMIT;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
+step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx at2 sc2 rx3 c2
+starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2398,19 +2270,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
+step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 sc2 c2
+starting permutation: rx1 s1 at1 sc1 wx s2 rx3 c2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2418,19 +2290,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step sc2: COMMIT;
 step c2: COMMIT;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 c2 sc2
+starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2438,19 +2310,19 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step c2: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
+step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 sc2 c2
+starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2458,7 +2330,6 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2466,11 +2337,12 @@ a_id
 3              
 3              
 3              
+step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
 step c2: COMMIT;
+step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 c2 sc2
+starting permutation: rx1 s1 at1 sc1 wx rx3 s2 c2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2478,7 +2350,6 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2486,11 +2357,12 @@ a_id
 3              
 3              
 3              
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step s2: BEGIN;
 step c2: COMMIT;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 s2 wx rx3 c2 at2 sc2
+starting permutation: rx1 s1 at1 sc1 wx rx3 c2 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
@@ -2498,7 +2370,6 @@ a_id
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
 step sc1: COMMIT;
-step s2: BEGIN;
 step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2507,18 +2378,20 @@ a_id
 3              
 3              
 step c2: COMMIT;
+step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 at2 sc2 rx3 c2
+starting permutation: rx1 s1 at1 wx sc1 s2 at2 sc2 rx3 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
@@ -2530,15 +2403,16 @@ a_id
 3              
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 sc2 c2
+starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
@@ -2550,15 +2424,16 @@ a_id
 step sc2: COMMIT;
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 c2 sc2
+starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
@@ -2570,15 +2445,16 @@ a_id
 step c2: COMMIT;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 sc2 c2
+starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2590,15 +2466,16 @@ step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 c2 sc2
+starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2610,15 +2487,16 @@ step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step c2: COMMIT;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx s2 rx3 c2 at2 sc2
+starting permutation: rx1 s1 at1 wx sc1 s2 rx3 c2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step s2: BEGIN;
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
@@ -2630,15 +2508,16 @@ step c2: COMMIT;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 sc2 c2
+starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 sc2 c2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2650,15 +2529,16 @@ step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 c2 sc2
+starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 c2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2670,15 +2550,16 @@ step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step c2: COMMIT;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx rx3 s2 c2 at2 sc2
+starting permutation: rx1 s1 at1 wx sc1 rx3 s2 c2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2690,15 +2571,16 @@ step c2: COMMIT;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 sc1 wx rx3 c2 s2 at2 sc2
+starting permutation: rx1 s1 at1 wx sc1 rx3 c2 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: INSERT INTO b VALUES (0);
+step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2710,19 +2592,14 @@ step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 s2 at2 sc2 rx3 c2
+starting permutation: rx1 s1 wx at1 rx3 c2 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
+step wx: INSERT INTO b VALUES (0);
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2730,102 +2607,61 @@ a_id
 3              
 3              
 step c2: COMMIT;
-
-starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
+step at1: <... completed>
 step sc1: COMMIT;
-step wx: <... completed>
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
 step sc2: COMMIT;
-step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 c2 sc2
+starting permutation: rx1 s1 wx rx3 at1 c2 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
+step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
 step c2: COMMIT;
+step at1: <... completed>
+step sc1: COMMIT;
+step s2: BEGIN;
+step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 sc2 c2
+starting permutation: rx1 s1 wx rx3 c2 at1 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step s2: BEGIN;
+step wx: INSERT INTO b VALUES (0);
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
 step c2: COMMIT;
-
-starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
 step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
 step sc1: COMMIT;
-step wx: <... completed>
 step s2: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step c2: COMMIT;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 s2 rx3 c2 at2 sc2
+starting permutation: rx1 wx s1 at1 rx3 c2 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step wx: INSERT INTO b VALUES (0);
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step s2: BEGIN;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
@@ -2833,787 +2669,53 @@ a_id
 3              
 3              
 step c2: COMMIT;
+step at1: <... completed>
+step sc1: COMMIT;
+step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 sc2 c2
+starting permutation: rx1 wx s1 rx3 at1 c2 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step wx: INSERT INTO b VALUES (0);
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step c2: COMMIT;
+step at1: <... completed>
+step sc1: COMMIT;
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
 step sc2: COMMIT;
-step c2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 c2 sc2
+starting permutation: rx1 wx s1 rx3 c2 at1 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
 
 1              
+step wx: INSERT INTO b VALUES (0);
 step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
 step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
 a_id           
 
 3              
 3              
 3              
+step c2: COMMIT;
+step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step sc1: COMMIT;
 step s2: BEGIN;
 step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step c2: COMMIT;
 step sc2: COMMIT;
 
-starting permutation: rx1 s1 at1 wx sc1 rx3 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step s2: BEGIN;
-step c2: COMMIT;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 s1 at1 wx sc1 rx3 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-step sc1: COMMIT;
-step wx: <... completed>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step c2: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 s1 at1 wx rx3 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 at1 wx rx3 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 at1 wx rx3 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 at1 wx rx3 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 at1 wx rx3 c2 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step wx: INSERT INTO b VALUES (0); <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 at2 sc2 rx3 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 at2 rx3 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 at2 rx3 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 rx3 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 rx3 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 s2 rx3 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 rx3 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 rx3 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 rx3 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 sc1 rx3 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 rx3 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 rx3 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 rx3 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 rx3 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 s1 wx at1 rx3 c2 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 s1 wx rx3 at1 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx rx3 at1 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx rx3 at1 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx rx3 at1 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 s1 wx rx3 at1 c2 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 s1 wx rx3 c2 at1 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step s1: BEGIN;
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step c2: COMMIT;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 wx s1 at1 sc1 s2 at2 sc2 rx3 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 s2 at2 rx3 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 s2 at2 rx3 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 s2 rx3 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 s2 rx3 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 s2 rx3 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 rx3 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 rx3 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 rx3 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 sc1 rx3 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 rx3 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 rx3 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 rx3 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 rx3 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-invalid permutation detected
-
-starting permutation: rx1 wx s1 at1 rx3 c2 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 wx s1 rx3 at1 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 rx3 at1 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 rx3 at1 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 rx3 at1 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx s1 rx3 at1 c2 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-step c2: COMMIT;
-step at1: <... completed>
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 wx s1 rx3 c2 at1 sc1 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step s1: BEGIN;
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step c2: COMMIT;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
-step sc1: COMMIT;
-step s2: BEGIN;
-step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk;
-step sc2: COMMIT;
-
-starting permutation: rx1 wx rx3 s1 at1 sc1 s2 at2 sc2 c2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx rx3 s1 at1 sc1 s2 at2 c2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx rx3 s1 at1 sc1 s2 c2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
-starting permutation: rx1 wx rx3 s1 at1 sc1 c2 s2 at2 sc2
-step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
-a_id           
-
-1              
-step wx: INSERT INTO b VALUES (0);
-step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3;
-a_id           
-
-3              
-3              
-3              
-step s1: BEGIN;
-step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
-invalid permutation detected
-
 starting permutation: rx1 wx rx3 s1 at1 c2 sc1 s2 at2 sc2
 step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1;
 a_id           
diff --git a/src/test/isolation/expected/alter-table-2.out b/src/test/isolation/expected/alter-table-2.out
index cef7516..33ea442 100644
--- a/src/test/isolation/expected/alter-table-2.out
+++ b/src/test/isolation/expected/alter-table-2.out
@@ -86,36 +86,6 @@ 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;
@@ -185,36 +155,6 @@ 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;
@@ -267,36 +207,6 @@ 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;
@@ -332,67 +242,6 @@ 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;
@@ -411,22 +260,6 @@ 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;
@@ -531,36 +364,6 @@ 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;
@@ -613,36 +416,6 @@ 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;
@@ -678,67 +451,6 @@ 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;
@@ -757,22 +469,6 @@ 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;
@@ -860,36 +556,6 @@ 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;
@@ -925,67 +591,6 @@ 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;
@@ -1004,22 +609,6 @@ 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;
@@ -1090,67 +679,6 @@ 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;
@@ -1169,22 +697,6 @@ 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;
@@ -1220,37 +732,6 @@ 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;
@@ -1269,22 +750,6 @@ 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;
@@ -1320,22 +785,6 @@ 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;
diff --git a/src/test/isolation/expected/alter-table-3.out b/src/test/isolation/expected/alter-table-3.out
index 7dc64df..b4f3b5a 100644
--- a/src/test/isolation/expected/alter-table-3.out
+++ b/src/test/isolation/expected/alter-table-3.out
@@ -57,18 +57,6 @@ 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;
@@ -112,18 +100,6 @@ 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;
@@ -153,18 +129,6 @@ 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;
@@ -180,29 +144,6 @@ 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;
@@ -246,18 +187,6 @@ 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;
@@ -287,18 +216,6 @@ 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;
@@ -314,29 +231,6 @@ 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;
@@ -366,18 +260,6 @@ 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;
@@ -393,29 +275,6 @@ 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;
@@ -515,18 +374,6 @@ 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;
@@ -556,18 +403,6 @@ 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;
@@ -583,29 +418,6 @@ 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;
@@ -635,18 +447,6 @@ 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;
@@ -662,29 +462,6 @@ 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;
@@ -770,18 +547,6 @@ 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;
@@ -797,29 +562,6 @@ 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;
diff --git a/src/test/isolation/expected/create-trigger.out b/src/test/isolation/expected/create-trigger.out
index e8bb740..8deb64a 100644
--- a/src/test/isolation/expected/create-trigger.out
+++ b/src/test/isolation/expected/create-trigger.out
@@ -49,17 +49,6 @@ 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;
@@ -97,17 +86,6 @@ 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;
@@ -133,28 +111,6 @@ 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;
@@ -217,17 +173,6 @@ 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;
@@ -253,28 +198,6 @@ 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;
@@ -325,28 +248,6 @@ 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;
@@ -372,17 +273,6 @@ 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;
diff --git a/src/test/isolation/expected/delete-abort-savept.out b/src/test/isolation/expected/delete-abort-savept.out
index 3420cf4..284aa89 100644
--- a/src/test/isolation/expected/delete-abort-savept.out
+++ b/src/test/isolation/expected/delete-abort-savept.out
@@ -31,17 +31,6 @@ key            value
 1              1              
 step s2c: COMMIT;
 
-starting permutation: s1l s1svp s1d s1r s2l s2c s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s1d: DELETE FROM foo;
-step s1r: ROLLBACK TO f;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1l s1svp s1d s2l s1r s1c s2c
 step s1l: SELECT * FROM foo FOR KEY SHARE;
 key            value          
@@ -58,27 +47,6 @@ key            value
 1              1              
 step s2c: COMMIT;
 
-starting permutation: s1l s1svp s1d s2l s1r s2c s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s1d: DELETE FROM foo;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1r: ROLLBACK TO f;
-invalid permutation detected
-
-starting permutation: s1l s1svp s1d s2l s2c s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s1d: DELETE FROM foo;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1l s1svp s2l s1d s1r s1c s2c
 step s1l: SELECT * FROM foo FOR KEY SHARE;
 key            value          
@@ -95,36 +63,6 @@ key            value
 1              1              
 step s2c: COMMIT;
 
-starting permutation: s1l s1svp s2l s1d s1r s2c s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1d: DELETE FROM foo;
-step s1r: ROLLBACK TO f;
-invalid permutation detected
-
-starting permutation: s1l s1svp s2l s1d s2c s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1d: DELETE FROM foo;
-invalid permutation detected
-
-starting permutation: s1l s1svp s2l s2c s1d s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s1svp: SAVEPOINT f;
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1l s2l s1svp s1d s1r s1c s2c
 step s1l: SELECT * FROM foo FOR KEY SHARE;
 key            value          
@@ -141,76 +79,6 @@ key            value
 1              1              
 step s2c: COMMIT;
 
-starting permutation: s1l s2l s1svp s1d s1r s2c s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1svp: SAVEPOINT f;
-step s1d: DELETE FROM foo;
-step s1r: ROLLBACK TO f;
-invalid permutation detected
-
-starting permutation: s1l s2l s1svp s1d s2c s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1svp: SAVEPOINT f;
-step s1d: DELETE FROM foo;
-invalid permutation detected
-
-starting permutation: s1l s2l s1svp s2c s1d s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-step s1svp: SAVEPOINT f;
-invalid permutation detected
-
-starting permutation: s1l s2l s2c s1svp s1d s1r s1c
-step s1l: SELECT * FROM foo FOR KEY SHARE;
-key            value          
-
-1              1              
-step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1l s1svp s1d s1r s1c s2c
-step s2l: SELECT * FROM foo FOR UPDATE;
-key            value          
-
-1              1              
-step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1l s1svp s1d s1r s2c s1c
-step s2l: SELECT * FROM foo FOR UPDATE;
-key            value          
-
-1              1              
-step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1l s1svp s1d s2c s1r s1c
-step s2l: SELECT * FROM foo FOR UPDATE;
-key            value          
-
-1              1              
-step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2l s1l s1svp s2c s1d s1r s1c
-step s2l: SELECT * FROM foo FOR UPDATE;
-key            value          
-
-1              1              
-step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2l s1l s2c s1svp s1d s1r s1c
 step s2l: SELECT * FROM foo FOR UPDATE;
 key            value          
diff --git a/src/test/isolation/expected/fk-deadlock.out b/src/test/isolation/expected/fk-deadlock.out
index 69eac88..ce6ef8c 100644
--- a/src/test/isolation/expected/fk-deadlock.out
+++ b/src/test/isolation/expected/fk-deadlock.out
@@ -25,13 +25,6 @@ step s1c: COMMIT;
 step s2u: <... completed>
 step s2c: COMMIT;
 
-starting permutation: s1i s1u s2i s2u s2c s1c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1i s2i s1u s1c s2u s2c
 step s1i: INSERT INTO child VALUES (1, 1);
 step s2i: INSERT INTO child VALUES (2, 1);
@@ -49,20 +42,6 @@ step s1c: COMMIT;
 step s2u: <... completed>
 step s2c: COMMIT;
 
-starting permutation: s1i s2i s1u s2u s2c s1c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1i s2i s2u s1u s1c s2c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1i s2i s2u s1u s2c s1c
 step s1i: INSERT INTO child VALUES (1, 1);
 step s2i: INSERT INTO child VALUES (2, 1);
@@ -97,20 +76,6 @@ step s1c: COMMIT;
 step s2u: <... completed>
 step s2c: COMMIT;
 
-starting permutation: s2i s1i s1u s2u s2c s1c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2i s1i s2u s1u s1c s2c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2i s1i s2u s1u s2c s1c
 step s2i: INSERT INTO child VALUES (2, 1);
 step s1i: INSERT INTO child VALUES (1, 1);
@@ -128,13 +93,6 @@ step s2c: COMMIT;
 step s1u: UPDATE parent SET aux = 'bar';
 step s1c: COMMIT;
 
-starting permutation: s2i s2u s1i s1u s1c s2c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2i s2u s1i s1u s2c s1c
 step s2i: INSERT INTO child VALUES (2, 1);
 step s2u: UPDATE parent SET aux = 'baz';
diff --git a/src/test/isolation/expected/fk-deadlock2.out b/src/test/isolation/expected/fk-deadlock2.out
index eda1185..41a818d 100644
--- a/src/test/isolation/expected/fk-deadlock2.out
+++ b/src/test/isolation/expected/fk-deadlock2.out
@@ -17,31 +17,6 @@ step s2u1: <... completed>
 step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s2c: COMMIT;
 
-starting permutation: s1u1 s1u2 s2u1 s2u2 s1c 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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s1u2 s2u1 s2u2 s2c s1c
-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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s2u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -51,13 +26,6 @@ step s2c: COMMIT;
 step s1u2: <... completed>
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -75,19 +43,6 @@ step s2c: COMMIT;
 step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s1c: COMMIT;
 
-starting permutation: s2u1 s1u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -97,13 +52,6 @@ step s2c: COMMIT;
 step s1u2: <... completed>
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -121,13 +69,6 @@ step s2c: COMMIT;
 step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s1c: COMMIT;
 
-starting permutation: s2u1 s2u2 s1u1 s1u2 s1c s2c
-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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c
 step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
diff --git a/src/test/isolation/expected/fk-deadlock2_1.out b/src/test/isolation/expected/fk-deadlock2_1.out
index 384bb9d..3827348 100644
--- a/src/test/isolation/expected/fk-deadlock2_1.out
+++ b/src/test/isolation/expected/fk-deadlock2_1.out
@@ -19,31 +19,6 @@ 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 s1u2 s2u1 s2u2 s1c 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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s1u2 s2u1 s2u2 s2c s1c
-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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s2u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -54,13 +29,6 @@ step s1u2: <... completed>
 error in steps s2c s1u2: ERROR:  could not serialize access due to concurrent update
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -80,19 +48,6 @@ 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;
 
-starting permutation: s2u1 s1u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -103,13 +58,6 @@ step s1u2: <... completed>
 error in steps s2c s1u2: ERROR:  could not serialize access due to concurrent update
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -129,13 +77,6 @@ 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;
 
-starting permutation: s2u1 s2u2 s1u1 s1u2 s1c s2c
-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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c
 step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
diff --git a/src/test/isolation/expected/fk-deadlock2_2.out b/src/test/isolation/expected/fk-deadlock2_2.out
index b6538a5..b6be4b9 100644
--- a/src/test/isolation/expected/fk-deadlock2_2.out
+++ b/src/test/isolation/expected/fk-deadlock2_2.out
@@ -19,31 +19,6 @@ 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 s1u2 s2u1 s2u2 s1c 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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s1u2 s2u1 s2u2 s2c s1c
-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 ...>
-invalid permutation detected
-
-starting permutation: s1u1 s2u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -54,13 +29,6 @@ step s1u2: <... completed>
 error in steps s2c s1u2: ERROR:  could not serialize access due to concurrent update
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -80,19 +48,6 @@ step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
 ERROR:  could not serialize access due to concurrent update
 step s1c: COMMIT;
 
-starting permutation: s2u1 s1u1 s1u2 s1c s2u2 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 ...>
-invalid permutation detected
-
-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;
-invalid permutation detected
-
 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;
@@ -103,13 +58,6 @@ step s1u2: <... completed>
 error in steps s2c s1u2: ERROR:  could not serialize access due to concurrent update
 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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 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;
@@ -129,13 +77,6 @@ step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
 ERROR:  could not serialize access due to concurrent update
 step s1c: COMMIT;
 
-starting permutation: s2u1 s2u2 s1u1 s1u2 s1c s2c
-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;
-step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c
 step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2;
 step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2;
diff --git a/src/test/isolation/expected/fk-deadlock_1.out b/src/test/isolation/expected/fk-deadlock_1.out
index 6687505..0dae5d3 100644
--- a/src/test/isolation/expected/fk-deadlock_1.out
+++ b/src/test/isolation/expected/fk-deadlock_1.out
@@ -27,13 +27,6 @@ step s2u: <... completed>
 error in steps s1c s2u: ERROR:  could not serialize access due to concurrent update
 step s2c: COMMIT;
 
-starting permutation: s1i s1u s2i s2u s2c s1c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1i s2i s1u s1c s2u s2c
 step s1i: INSERT INTO child VALUES (1, 1);
 step s2i: INSERT INTO child VALUES (2, 1);
@@ -53,20 +46,6 @@ step s2u: <... completed>
 error in steps s1c s2u: ERROR:  could not serialize access due to concurrent update
 step s2c: COMMIT;
 
-starting permutation: s1i s2i s1u s2u s2c s1c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
-starting permutation: s1i s2i s2u s1u s1c s2c
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s1i s2i s2u s1u s2c s1c
 step s1i: INSERT INTO child VALUES (1, 1);
 step s2i: INSERT INTO child VALUES (2, 1);
@@ -105,20 +84,6 @@ step s2u: <... completed>
 error in steps s1c s2u: ERROR:  could not serialize access due to concurrent update
 step s2c: COMMIT;
 
-starting permutation: s2i s1i s1u s2u s2c s1c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar';
-step s2u: UPDATE parent SET aux = 'baz'; <waiting ...>
-invalid permutation detected
-
-starting permutation: s2i s1i s2u s1u s1c s2c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s1i: INSERT INTO child VALUES (1, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2i s1i s2u s1u s2c s1c
 step s2i: INSERT INTO child VALUES (2, 1);
 step s1i: INSERT INTO child VALUES (1, 1);
@@ -138,13 +103,6 @@ step s1u: UPDATE parent SET aux = 'bar';
 ERROR:  could not serialize access due to concurrent update
 step s1c: COMMIT;
 
-starting permutation: s2i s2u s1i s1u s1c s2c
-step s2i: INSERT INTO child VALUES (2, 1);
-step s2u: UPDATE parent SET aux = 'baz';
-step s1i: INSERT INTO child VALUES (1, 1);
-step s1u: UPDATE parent SET aux = 'bar'; <waiting ...>
-invalid permutation detected
-
 starting permutation: s2i s2u s1i s1u s2c s1c
 step s2i: INSERT INTO child VALUES (2, 1);
 step s2u: UPDATE parent SET aux = 'baz';
diff --git a/src/test/isolation/specs/aborted-keyrevoke.spec b/src/test/isolation/specs/aborted-keyrevoke.spec
index c60aa0c..08945d8 100644
--- a/src/test/isolation/specs/aborted-keyrevoke.spec
+++ b/src/test/isolation/specs/aborted-keyrevoke.spec
@@ -29,3 +29,18 @@ session "s2"
 setup		{ BEGIN; }
 step "s2l"	{ SELECT * FROM foo FOR KEY SHARE; }
 step "s2c"	{ COMMIT; }
+
+permutation "s1s" "s1u" "s1r" "s1l" "s1c" "s2l" "s2c"
+permutation "s1s" "s1u" "s1r" "s1l" "s2l" "s1c" "s2c"
+permutation "s1s" "s1u" "s1r" "s1l" "s2l" "s2c" "s1c"
+permutation "s1s" "s1u" "s1r" "s2l" "s1l" "s1c" "s2c"
+permutation "s1s" "s1u" "s1r" "s2l" "s1l" "s2c" "s1c"
+permutation "s1s" "s1u" "s1r" "s2l" "s2c" "s1l" "s1c"
+permutation "s1s" "s1u" "s2l" "s1r" "s1l" "s1c" "s2c"
+permutation "s1s" "s1u" "s2l" "s1r" "s1l" "s2c" "s1c"
+permutation "s1s" "s1u" "s2l" "s1r" "s2c" "s1l" "s1c"
+permutation "s1s" "s2l" "s1u" "s2c" "s1r" "s1l" "s1c"
+permutation "s1s" "s2l" "s2c" "s1u" "s1r" "s1l" "s1c"
+permutation "s2l" "s1s" "s1u" "s2c" "s1r" "s1l" "s1c"
+permutation "s2l" "s1s" "s2c" "s1u" "s1r" "s1l" "s1c"
+permutation "s2l" "s2c" "s1s" "s1u" "s1r" "s1l" "s1c"
diff --git a/src/test/isolation/specs/alter-table-1.spec b/src/test/isolation/specs/alter-table-1.spec
index 6b38dc1..10e463f 100644
--- a/src/test/isolation/specs/alter-table-1.spec
+++ b/src/test/isolation/specs/alter-table-1.spec
@@ -30,3 +30,141 @@ step "rx1"	{ SELECT * FROM b WHERE a_id = 1 LIMIT 1; }
 step "wx"	{ INSERT INTO b VALUES (0); }
 step "rx3"	{ SELECT * FROM b WHERE a_id = 3 LIMIT 3; }
 step "c2"	{ COMMIT; }
+
+permutation "s1" "at1" "sc1" "s2" "at2" "sc2" "rx1" "wx" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "at2" "rx1" "sc2" "wx" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "at2" "rx1" "wx" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "at2" "rx1" "wx" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "s2" "at2" "rx1" "wx" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "at2" "sc2" "wx" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "at2" "wx" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "at2" "wx" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "at2" "wx" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "sc1" "s2" "rx1" "wx" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "at2" "sc2" "wx" "rx3" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "at2" "wx" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "at2" "wx" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "at2" "wx" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "s2" "wx" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "s2" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "rx3" "s2" "at2" "sc2" "c2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "rx3" "s2" "at2" "c2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "rx3" "s2" "c2" "at2" "sc2"
+permutation "s1" "at1" "sc1" "rx1" "wx" "rx3" "c2" "s2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "at2" "sc2" "wx" "rx3" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "at2" "wx" "sc2" "rx3" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "at2" "wx" "rx3" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "at2" "wx" "rx3" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "s2" "wx" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "s2" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "rx3" "s2" "at2" "sc2" "c2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "rx3" "s2" "at2" "c2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "rx3" "s2" "c2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "sc1" "wx" "rx3" "c2" "s2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "at2" "sc2" "rx3" "c2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "at2" "rx3" "sc2" "c2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "at2" "rx3" "c2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "rx3" "at2" "sc2" "c2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "rx3" "at2" "c2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "s2" "rx3" "c2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "rx3" "s2" "at2" "sc2" "c2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "rx3" "s2" "at2" "c2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "rx3" "s2" "c2" "at2" "sc2"
+permutation "s1" "at1" "rx1" "wx" "sc1" "rx3" "c2" "s2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "at2" "sc2" "wx" "rx3" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "at2" "wx" "sc2" "rx3" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "at2" "wx" "rx3" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "at2" "wx" "rx3" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "at2" "sc2" "rx3" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "at2" "rx3" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "at2" "rx3" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "rx3" "at2" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "rx3" "at2" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "s2" "wx" "rx3" "c2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "at2" "sc2" "rx3" "c2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "at2" "rx3" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "at2" "rx3" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "rx3" "at2" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "rx3" "at2" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "s2" "rx3" "c2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "rx3" "s2" "at2" "sc2" "c2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "rx3" "s2" "at2" "c2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "rx3" "s2" "c2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "sc1" "wx" "rx3" "c2" "s2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "at2" "sc2" "rx3" "c2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "at2" "rx3" "sc2" "c2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "at2" "rx3" "c2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "rx3" "at2" "sc2" "c2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "rx3" "at2" "c2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "s2" "rx3" "c2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "rx3" "s2" "at2" "sc2" "c2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "rx3" "s2" "at2" "c2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "rx3" "s2" "c2" "at2" "sc2"
+permutation "s1" "rx1" "at1" "wx" "sc1" "rx3" "c2" "s2" "at2" "sc2"
+permutation "s1" "rx1" "wx" "at1" "rx3" "c2" "sc1" "s2" "at2" "sc2"
+permutation "s1" "rx1" "wx" "rx3" "at1" "c2" "sc1" "s2" "at2" "sc2"
+permutation "s1" "rx1" "wx" "rx3" "c2" "at1" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "at2" "sc2" "wx" "rx3" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "at2" "wx" "sc2" "rx3" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "at2" "wx" "rx3" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "at2" "wx" "rx3" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "at2" "sc2" "rx3" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "at2" "rx3" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "at2" "rx3" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "rx3" "at2" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "rx3" "at2" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "s2" "wx" "rx3" "c2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "at2" "sc2" "rx3" "c2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "at2" "rx3" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "at2" "rx3" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "rx3" "at2" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "rx3" "at2" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "s2" "rx3" "c2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "rx3" "s2" "at2" "sc2" "c2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "rx3" "s2" "at2" "c2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "rx3" "s2" "c2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "sc1" "wx" "rx3" "c2" "s2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "at2" "sc2" "rx3" "c2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "at2" "rx3" "sc2" "c2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "at2" "rx3" "c2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "rx3" "at2" "sc2" "c2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "rx3" "at2" "c2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "s2" "rx3" "c2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "rx3" "s2" "at2" "sc2" "c2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "rx3" "s2" "at2" "c2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "rx3" "s2" "c2" "at2" "sc2"
+permutation "rx1" "s1" "at1" "wx" "sc1" "rx3" "c2" "s2" "at2" "sc2"
+permutation "rx1" "s1" "wx" "at1" "rx3" "c2" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "s1" "wx" "rx3" "at1" "c2" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "s1" "wx" "rx3" "c2" "at1" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "s1" "at1" "rx3" "c2" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "s1" "rx3" "at1" "c2" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "s1" "rx3" "c2" "at1" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "rx3" "s1" "at1" "c2" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "rx3" "s1" "c2" "at1" "sc1" "s2" "at2" "sc2"
+permutation "rx1" "wx" "rx3" "c2" "s1" "at1" "sc1" "s2" "at2" "sc2"
diff --git a/src/test/isolation/specs/alter-table-2.spec b/src/test/isolation/specs/alter-table-2.spec
index e6a02e0..9b17992 100644
--- a/src/test/isolation/specs/alter-table-2.spec
+++ b/src/test/isolation/specs/alter-table-2.spec
@@ -28,3 +28,52 @@ 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; }
+
+permutation "s1a" "s1b" "s1c" "s2a" "s2b" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s1b" "s2a" "s1c" "s2b" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s1b" "s2a" "s2b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s1b" "s2a" "s2b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s1a" "s1b" "s2a" "s2b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s1a" "s2a" "s1b" "s1c" "s2b" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s1b" "s2b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s1b" "s2b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s1b" "s2b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s1b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s1b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s1b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s1c" "s2d" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s2d" "s1c" "s2e" "s2f"
+permutation "s1a" "s2a" "s2b" "s2c" "s2d" "s1b" "s2e" "s2f" "s1c"
+permutation "s1a" "s2a" "s2b" "s2c" "s2d" "s2e" "s1b" "s2f" "s1c"
+permutation "s1a" "s2a" "s2b" "s2c" "s2d" "s2e" "s2f" "s1b" "s1c"
+permutation "s2a" "s1a" "s1b" "s1c" "s2b" "s2c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s1b" "s2b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s1b" "s2b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s1b" "s2b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s1b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s1b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s1b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s1a" "s2b" "s2c" "s2d" "s1b" "s2e" "s2f" "s1c"
+permutation "s2a" "s1a" "s2b" "s2c" "s2d" "s2e" "s1b" "s2f" "s1c"
+permutation "s2a" "s1a" "s2b" "s2c" "s2d" "s2e" "s2f" "s1b" "s1c"
+permutation "s2a" "s2b" "s1a" "s1b" "s1c" "s2c" "s2d" "s2e" "s2f"
+permutation "s2a" "s2b" "s1a" "s1b" "s2c" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s2b" "s1a" "s1b" "s2c" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s2b" "s1a" "s2c" "s2d" "s1b" "s2e" "s2f" "s1c"
+permutation "s2a" "s2b" "s1a" "s2c" "s2d" "s2e" "s1b" "s2f" "s1c"
+permutation "s2a" "s2b" "s1a" "s2c" "s2d" "s2e" "s2f" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s1c" "s2d" "s2e" "s2f"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s2d" "s1c" "s2e" "s2f"
+permutation "s2a" "s2b" "s2c" "s1a" "s2d" "s1b" "s2e" "s2f" "s1c"
+permutation "s2a" "s2b" "s2c" "s1a" "s2d" "s2e" "s1b" "s2f" "s1c"
+permutation "s2a" "s2b" "s2c" "s1a" "s2d" "s2e" "s2f" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s1a" "s1b" "s2e" "s2f" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s1a" "s2e" "s1b" "s2f" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s1a" "s2e" "s2f" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s2e" "s1a" "s1b" "s2f" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s2e" "s1a" "s2f" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s2e" "s2f" "s1a" "s1b" "s1c"
diff --git a/src/test/isolation/specs/alter-table-3.spec b/src/test/isolation/specs/alter-table-3.spec
index d252620..d07e3dd 100644
--- a/src/test/isolation/specs/alter-table-3.spec
+++ b/src/test/isolation/specs/alter-table-3.spec
@@ -28,3 +28,52 @@ 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; }
+
+permutation "s1a" "s1b" "s1c" "s1d" "s2a" "s2b" "s2c" "s2d"
+permutation "s1a" "s1b" "s1c" "s2a" "s1d" "s2b" "s2c" "s2d"
+permutation "s1a" "s1b" "s1c" "s2a" "s2b" "s1d" "s2c" "s2d"
+permutation "s1a" "s1b" "s1c" "s2a" "s2b" "s2c" "s1d" "s2d"
+permutation "s1a" "s1b" "s2a" "s1c" "s1d" "s2b" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s1c" "s2b" "s1d" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s1c" "s2b" "s2c" "s1d" "s2d"
+permutation "s1a" "s1b" "s2a" "s2b" "s1c" "s1d" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s2b" "s1c" "s2c" "s1d" "s2d"
+permutation "s1a" "s1b" "s2a" "s2b" "s2c" "s1c" "s1d" "s2d"
+permutation "s1a" "s2a" "s1b" "s1c" "s1d" "s2b" "s2c" "s2d"
+permutation "s1a" "s2a" "s1b" "s1c" "s2b" "s1d" "s2c" "s2d"
+permutation "s1a" "s2a" "s1b" "s1c" "s2b" "s2c" "s1d" "s2d"
+permutation "s1a" "s2a" "s1b" "s2b" "s1c" "s1d" "s2c" "s2d"
+permutation "s1a" "s2a" "s1b" "s2b" "s1c" "s2c" "s1d" "s2d"
+permutation "s1a" "s2a" "s1b" "s2b" "s2c" "s1c" "s1d" "s2d"
+permutation "s1a" "s2a" "s2b" "s1b" "s1c" "s1d" "s2c" "s2d"
+permutation "s1a" "s2a" "s2b" "s1b" "s1c" "s2c" "s1d" "s2d"
+permutation "s1a" "s2a" "s2b" "s1b" "s2c" "s1c" "s1d" "s2d"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s1c" "s1d" "s2d"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s1c" "s2d" "s1d"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s2d" "s1c" "s1d"
+permutation "s1a" "s2a" "s2b" "s2c" "s2d" "s1b" "s1c" "s1d"
+permutation "s2a" "s1a" "s1b" "s1c" "s1d" "s2b" "s2c" "s2d"
+permutation "s2a" "s1a" "s1b" "s1c" "s2b" "s1d" "s2c" "s2d"
+permutation "s2a" "s1a" "s1b" "s1c" "s2b" "s2c" "s1d" "s2d"
+permutation "s2a" "s1a" "s1b" "s2b" "s1c" "s1d" "s2c" "s2d"
+permutation "s2a" "s1a" "s1b" "s2b" "s1c" "s2c" "s1d" "s2d"
+permutation "s2a" "s1a" "s1b" "s2b" "s2c" "s1c" "s1d" "s2d"
+permutation "s2a" "s1a" "s2b" "s1b" "s1c" "s1d" "s2c" "s2d"
+permutation "s2a" "s1a" "s2b" "s1b" "s1c" "s2c" "s1d" "s2d"
+permutation "s2a" "s1a" "s2b" "s1b" "s2c" "s1c" "s1d" "s2d"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s1c" "s1d" "s2d"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s1c" "s2d" "s1d"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s2d" "s1c" "s1d"
+permutation "s2a" "s1a" "s2b" "s2c" "s2d" "s1b" "s1c" "s1d"
+permutation "s2a" "s2b" "s1a" "s1b" "s1c" "s1d" "s2c" "s2d"
+permutation "s2a" "s2b" "s1a" "s1b" "s1c" "s2c" "s1d" "s2d"
+permutation "s2a" "s2b" "s1a" "s1b" "s2c" "s1c" "s1d" "s2d"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s1c" "s1d" "s2d"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s1c" "s2d" "s1d"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s2d" "s1c" "s1d"
+permutation "s2a" "s2b" "s1a" "s2c" "s2d" "s1b" "s1c" "s1d"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s1c" "s1d" "s2d"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s1c" "s2d" "s1d"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s2d" "s1c" "s1d"
+permutation "s2a" "s2b" "s2c" "s1a" "s2d" "s1b" "s1c" "s1d"
+permutation "s2a" "s2b" "s2c" "s2d" "s1a" "s1b" "s1c" "s1d"
diff --git a/src/test/isolation/specs/create-trigger.spec b/src/test/isolation/specs/create-trigger.spec
index 34fad75..caac381 100644
--- a/src/test/isolation/specs/create-trigger.spec
+++ b/src/test/isolation/specs/create-trigger.spec
@@ -26,3 +26,29 @@ 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; }
+
+permutation "s1a" "s1b" "s1c" "s2a" "s2b" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s1c" "s2b" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s2b" "s1c" "s2c" "s2d"
+permutation "s1a" "s1b" "s2a" "s2b" "s2c" "s1c" "s2d"
+permutation "s1a" "s2a" "s1b" "s1c" "s2b" "s2c" "s2d"
+permutation "s1a" "s2a" "s1b" "s2b" "s1c" "s2c" "s2d"
+permutation "s1a" "s2a" "s1b" "s2b" "s2c" "s1c" "s2d"
+permutation "s1a" "s2a" "s2b" "s1b" "s1c" "s2c" "s2d"
+permutation "s1a" "s2a" "s2b" "s1b" "s2c" "s1c" "s2d"
+permutation "s1a" "s2a" "s2b" "s2c" "s1b" "s2d" "s1c"
+permutation "s1a" "s2a" "s2b" "s2c" "s2d" "s1b" "s1c"
+permutation "s2a" "s1a" "s1b" "s1c" "s2b" "s2c" "s2d"
+permutation "s2a" "s1a" "s1b" "s2b" "s1c" "s2c" "s2d"
+permutation "s2a" "s1a" "s1b" "s2b" "s2c" "s1c" "s2d"
+permutation "s2a" "s1a" "s2b" "s1b" "s1c" "s2c" "s2d"
+permutation "s2a" "s1a" "s2b" "s1b" "s2c" "s1c" "s2d"
+permutation "s2a" "s1a" "s2b" "s2c" "s1b" "s2d" "s1c"
+permutation "s2a" "s1a" "s2b" "s2c" "s2d" "s1b" "s1c"
+permutation "s2a" "s2b" "s1a" "s1b" "s1c" "s2c" "s2d"
+permutation "s2a" "s2b" "s1a" "s1b" "s2c" "s1c" "s2d"
+permutation "s2a" "s2b" "s1a" "s2c" "s1b" "s2d" "s1c"
+permutation "s2a" "s2b" "s1a" "s2c" "s2d" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s1a" "s1b" "s2d" "s1c"
+permutation "s2a" "s2b" "s2c" "s1a" "s2d" "s1b" "s1c"
+permutation "s2a" "s2b" "s2c" "s2d" "s1a" "s1b" "s1c"
diff --git a/src/test/isolation/specs/delete-abort-savept.spec b/src/test/isolation/specs/delete-abort-savept.spec
index e41df20..bc32e21 100644
--- a/src/test/isolation/specs/delete-abort-savept.spec
+++ b/src/test/isolation/specs/delete-abort-savept.spec
@@ -27,3 +27,11 @@ session "s2"
 setup			{ BEGIN; }
 step "s2l"		{ SELECT * FROM foo FOR UPDATE; }
 step "s2c"		{ COMMIT; }
+
+permutation "s1l" "s1svp" "s1d" "s1r" "s1c" "s2l" "s2c"
+permutation "s1l" "s1svp" "s1d" "s1r" "s2l" "s1c" "s2c"
+permutation "s1l" "s1svp" "s1d" "s2l" "s1r" "s1c" "s2c"
+permutation "s1l" "s1svp" "s2l" "s1d" "s1r" "s1c" "s2c"
+permutation "s1l" "s2l" "s1svp" "s1d" "s1r" "s1c" "s2c"
+permutation "s2l" "s1l" "s2c" "s1svp" "s1d" "s1r" "s1c"
+permutation "s2l" "s2c" "s1l" "s1svp" "s1d" "s1r" "s1c"
diff --git a/src/test/isolation/specs/fk-deadlock.spec b/src/test/isolation/specs/fk-deadlock.spec
index 44500d5..4f357c6 100644
--- a/src/test/isolation/specs/fk-deadlock.spec
+++ b/src/test/isolation/specs/fk-deadlock.spec
@@ -29,3 +29,18 @@ setup		{ BEGIN; SET deadlock_timeout = '10s'; }
 step "s2i"	{ INSERT INTO child VALUES (2, 1); }
 step "s2u"	{ UPDATE parent SET aux = 'baz'; }
 step "s2c"	{ COMMIT; }
+
+permutation "s1i" "s1u" "s1c" "s2i" "s2u" "s2c"
+permutation "s1i" "s1u" "s2i" "s1c" "s2u" "s2c"
+permutation "s1i" "s1u" "s2i" "s2u" "s1c" "s2c"
+permutation "s1i" "s2i" "s1u" "s1c" "s2u" "s2c"
+permutation "s1i" "s2i" "s1u" "s2u" "s1c" "s2c"
+permutation "s1i" "s2i" "s2u" "s1u" "s2c" "s1c"
+permutation "s1i" "s2i" "s2u" "s2c" "s1u" "s1c"
+permutation "s2i" "s1i" "s1u" "s1c" "s2u" "s2c"
+permutation "s2i" "s1i" "s1u" "s2u" "s1c" "s2c"
+permutation "s2i" "s1i" "s2u" "s1u" "s2c" "s1c"
+permutation "s2i" "s1i" "s2u" "s2c" "s1u" "s1c"
+permutation "s2i" "s2u" "s1i" "s1u" "s2c" "s1c"
+permutation "s2i" "s2u" "s1i" "s2c" "s1u" "s1c"
+permutation "s2i" "s2u" "s2c" "s1i" "s1u" "s1c"
diff --git a/src/test/isolation/specs/fk-deadlock2.spec b/src/test/isolation/specs/fk-deadlock2.spec
index f500b26..a830524 100644
--- a/src/test/isolation/specs/fk-deadlock2.spec
+++ b/src/test/isolation/specs/fk-deadlock2.spec
@@ -34,3 +34,15 @@ setup		{ BEGIN; SET deadlock_timeout = '10s'; }
 step "s2u1"	{ UPDATE B SET Col2 = 1 WHERE BID = 2; }
 step "s2u2"	{ UPDATE B SET Col2 = 1 WHERE BID = 2; }
 step "s2c"	{ COMMIT; }
+
+permutation "s1u1" "s1u2" "s1c" "s2u1" "s2u2" "s2c"
+permutation "s1u1" "s1u2" "s2u1" "s1c" "s2u2" "s2c"
+permutation "s1u1" "s2u1" "s1u2" "s2u2" "s2c" "s1c"
+permutation "s1u1" "s2u1" "s2u2" "s1u2" "s2c" "s1c"
+permutation "s1u1" "s2u1" "s2u2" "s2c" "s1u2" "s1c"
+permutation "s2u1" "s1u1" "s1u2" "s2u2" "s2c" "s1c"
+permutation "s2u1" "s1u1" "s2u2" "s1u2" "s2c" "s1c"
+permutation "s2u1" "s1u1" "s2u2" "s2c" "s1u2" "s1c"
+permutation "s2u1" "s2u2" "s1u1" "s1u2" "s2c" "s1c"
+permutation "s2u1" "s2u2" "s1u1" "s2c" "s1u2" "s1c"
+permutation "s2u1" "s2u2" "s2c" "s1u1" "s1u2" "s1c"
-- 
2.3.2 (Apple Git-55)

