summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/expected/alter-table-2.out
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:44:03 +0000
commit293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch)
treefc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/test/isolation/expected/alter-table-2.out
parentInitial commit. (diff)
downloadpostgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz
postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/isolation/expected/alter-table-2.out')
-rw-r--r--src/test/isolation/expected/alter-table-2.out1030
1 files changed, 1030 insertions, 0 deletions
diff --git a/src/test/isolation/expected/alter-table-2.out b/src/test/isolation/expected/alter-table-2.out
new file mode 100644
index 0000000..819bc33
--- /dev/null
+++ b/src/test/isolation/expected/alter-table-2.out
@@ -0,0 +1,1030 @@
+Parsed test spec with 2 sessions
+
+starting permutation: s1a s1b s1c s2a s2b s2c s2d s2e s2f
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s1b s2a s1c s2b s2c s2d s2e s2f
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2a: BEGIN;
+step s1c: COMMIT;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s1b s2a s2b s1c s2c s2d s2e s2f
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s1b s2a s2b s2c s1c s2d s2e s2f
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s1b s2a s2b s2c s2d s1c s2e s2f
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s1b s1c s2b s2c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s1b s2b s1c s2c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s1b s2b s2c s1c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s1b s2b s2c s2d s1c s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s1b s1c s2c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s1b s2c s1c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s1b s2c s2d s1c s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s2c s1b s1c s2d s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s2c s1b s2d s1c s2e s2f
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s1a s2a s2b s2c s2d s1b s2e s2f s1c
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s1a s2a s2b s2c s2d s2e s1b s2f s1c
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s1a s2a s2b s2c s2d s2e s2f s1b s1c
+step s1a: BEGIN;
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s1a s1b s1c s2b s2c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s1b s2b s1c s2c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s1b s2b s2c s1c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s1b s2b s2c s2d s1c s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s1b s1c s2c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s1b s2c s1c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s1b s2c s2d s1c s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s2c s1b s1c s2d s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s2c s1b s2d s1c s2e s2f
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s1a s2b s2c s2d s1b s2e s2f s1c
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f s1c
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s1a s2b s2c s2d s2e s2f s1b s1c
+step s2a: BEGIN;
+step s1a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s1a s1b s1c s2c s2d s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s1a s1b s2c s1c s2d s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s1a s1b s2c s2d s1c s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+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
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s1a s2c s1b s1c s2d s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s1a s2c s1b s2d s1c s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s1a s2c s2d s1b s2e s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s1a s2c s2d s2e s1b s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s1a s2c s2d s2e s2f s1b s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s1a: BEGIN;
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s1a s1b s1c s2d s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s2c s1a s1b s2d s1c s2e s2f
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s2d: INSERT INTO b VALUES (0); <waiting ...>
+step s1c: COMMIT;
+step s2d: <... completed>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+
+starting permutation: s2a s2b s2c s1a s2d s1b s2e s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1a: BEGIN;
+step s2d: INSERT INTO b VALUES (0);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s1a s2d s2e s1b s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1a: BEGIN;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s1a s2d s2e s2f s1b s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s1a: BEGIN;
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s1a s1b s2e s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s1a s2e s1b s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1a: BEGIN;
+step s2e: INSERT INTO a VALUES (4);
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s1a s2e s2f s1b s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s1a: BEGIN;
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s2e s1a s1b s2f s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...>
+step s2f: COMMIT;
+step s1b: <... completed>
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s2e s1a s2f s1b s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s1a: BEGIN;
+step s2f: COMMIT;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;
+
+starting permutation: s2a s2b s2c s2d s2e s2f s1a s1b s1c
+step s2a: BEGIN;
+step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE;
+i
+-
+1
+(1 row)
+
+step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE;
+a_id
+----
+ 3
+(1 row)
+
+step s2d: INSERT INTO b VALUES (0);
+step s2e: INSERT INTO a VALUES (4);
+step s2f: COMMIT;
+step s1a: BEGIN;
+step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID;
+step s1c: COMMIT;