Parsed test spec with 2 sessions

starting permutation: s2-begin s2-update-table-1 s1-begin s1-view-locks s1-rollback s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-update-table-1:
    UPDATE ref_table_1 SET id = 2 WHERE id = 1;

step s1-begin:
	BEGIN;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  1
ShareLock      1
step s1-rollback:
    ROLLBACK;

step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-delete-table-1 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  1
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-update-table-2 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-update-table-2:
    UPDATE ref_table_2 SET id = 2 WHERE id = 1;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  2
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-delete-table-2 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-delete-table-2:
    DELETE FROM ref_table_2 WHERE id = 1;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  2
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-update-table-3 s1-begin s1-view-locks s1-rollback s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE id = 1;

step s1-begin:
	BEGIN;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  3
ShareLock      1
step s1-rollback:
    ROLLBACK;

step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-delete-table-3 s1-begin s1-view-locks s1-rollback s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-delete-table-3:
    DELETE FROM ref_table_3 WHERE id = 1;

step s1-begin:
	BEGIN;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

ExclusiveLock  3
ShareLock      1
step s1-rollback:
    ROLLBACK;

step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-insert-table-1 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

RowExclusiveLock1
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-insert-table-2 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-insert-table-2:
    INSERT INTO ref_table_2 VALUES (7, 5);

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

RowExclusiveLock2
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s2-begin s2-insert-table-3 s1-view-locks s2-rollback s1-view-locks
step s2-begin:
	BEGIN;

step s2-insert-table-3:
    INSERT INTO ref_table_3 VALUES (7, 5);

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count

RowExclusiveLock3
ShareLock      1
step s2-rollback:
    ROLLBACK;

step s1-view-locks:
    SELECT mode, count(*)
    FROM pg_locks
    WHERE locktype='advisory'
    GROUP BY mode;

mode           count


starting permutation: s1-begin s2-begin s2-update-table-1 s1-delete-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-1:
    UPDATE ref_table_1 SET id = 2 WHERE id = 1;

step s1-delete-table-2:
    DELETE FROM ref_table_2 WHERE value = 2;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-delete-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-update-table-1 s1-insert-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-1:
    UPDATE ref_table_1 SET id = 2 WHERE id = 1;

step s1-insert-table-2:
    INSERT INTO ref_table_2 VALUES (7, 2);
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-insert-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

1              2
3              3
5              5
7              2

starting permutation: s1-begin s2-begin s2-update-table-1 s1-update-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-1:
    UPDATE ref_table_1 SET id = 2 WHERE id = 1;

step s1-update-table-2:
    UPDATE ref_table_2 SET id = 0 WHERE value = 2;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

0              2
3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-delete-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-delete-table-2:
    DELETE FROM ref_table_2 WHERE value = 2;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-delete-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-insert-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-insert-table-2:
    INSERT INTO ref_table_2 VALUES (7, 2);
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-insert-table-2: <... completed>
error in steps s2-commit s1-insert-table-2: ERROR:  insert or update on table "ref_table_2_xxxxxxx" violates foreign key constraint "ref_table_2_value_fkey_xxxxxxx"
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-update-table-2 s2-commit s1-commit s1-select-table-2
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-update-table-2:
    UPDATE ref_table_2 SET id = 0 WHERE value = 2;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-delete-table-3 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-delete-table-3:
    DELETE FROM ref_table_3 WHERE value = 1 RETURNING id;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-delete-table-3: <... completed>
id

step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-insert-table-3 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-insert-table-3:
    INSERT INTO ref_table_3 VALUES (7, 1);
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-insert-table-3: <... completed>
error in steps s2-commit s1-insert-table-3: ERROR:  insert or update on table "ref_table_3_xxxxxxx" violates foreign key constraint "ref_table_3_value_fkey_xxxxxxx"
step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-delete-table-1 s1-update-table-3 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-1:
    DELETE FROM ref_table_1 WHERE id = 1;

step s1-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE value = 1 RETURNING id;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-3: <... completed>
id

step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

3              3
5              5

starting permutation: s1-begin s2-begin s2-insert-table-1 s1-update-table-3 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE value = 1 RETURNING id;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-3: <... completed>
id

2
step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

2              1
3              3
5              5

starting permutation: s1-begin s2-begin s1-update-table-3 s2-insert-table-1 s1-commit s2-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s1-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE value = 1 RETURNING id;

id

2
step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);
 <waiting ...>
step s1-commit:
    COMMIT;

step s2-insert-table-1: <... completed>
step s2-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

2              1
3              3
5              5

starting permutation: s1-begin s2-begin s2-insert-table-1 s1-update-table-2 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-update-table-2:
    UPDATE ref_table_2 SET id = 0 WHERE value = 2;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-2: <... completed>
step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

1              1
3              3
5              5

starting permutation: s1-begin s2-begin s1-update-table-2 s2-insert-table-1 s1-commit s2-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s1-update-table-2:
    UPDATE ref_table_2 SET id = 0 WHERE value = 2;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);
 <waiting ...>
step s1-commit:
    COMMIT;

step s2-insert-table-1: <... completed>
step s2-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

1              1
3              3
5              5

starting permutation: s1-begin s2-begin s2-insert-table-2 s1-update-table-3 s2-commit s1-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-2:
    INSERT INTO ref_table_2 VALUES (7, 5);

step s1-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE value = 1 RETURNING id;
 <waiting ...>
step s2-commit:
    COMMIT;

step s1-update-table-3: <... completed>
id

2
step s1-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

2              1
3              3
5              5

starting permutation: s1-begin s2-begin s1-update-table-3 s2-insert-table-2 s1-commit s2-commit s1-select-table-3
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s1-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE value = 1 RETURNING id;

id

2
step s2-insert-table-2:
    INSERT INTO ref_table_2 VALUES (7, 5);
 <waiting ...>
step s1-commit:
    COMMIT;

step s2-insert-table-2: <... completed>
step s2-commit:
    COMMIT;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

2              1
3              3
5              5

starting permutation: s1-begin s2-begin s2-insert-table-1 s1-select-table-1 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-select-table-1:
    SELECT * FROM ref_table_1 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-insert-table-1 s1-select-table-2 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-insert-table-1 s1-select-table-3 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-insert-table-1:
    INSERT INTO ref_table_1 VALUES (7, 7);

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-delete-table-2 s1-select-table-1 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-2:
    DELETE FROM ref_table_2 WHERE id = 1;

step s1-select-table-1:
    SELECT * FROM ref_table_1 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-delete-table-2 s1-select-table-2 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-2:
    DELETE FROM ref_table_2 WHERE id = 1;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-delete-table-2 s1-select-table-3 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-delete-table-2:
    DELETE FROM ref_table_2 WHERE id = 1;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-update-table-3 s1-select-table-1 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE id = 1;

step s1-select-table-1:
    SELECT * FROM ref_table_1 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-update-table-3 s1-select-table-2 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE id = 1;

step s1-select-table-2:
    SELECT * FROM ref_table_2 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;


starting permutation: s1-begin s2-begin s2-update-table-3 s1-select-table-3 s2-commit s1-commit
step s1-begin:
	BEGIN;

step s2-begin:
	BEGIN;

step s2-update-table-3:
    UPDATE ref_table_3 SET id = 2 WHERE id = 1;

step s1-select-table-3:
    SELECT * FROM ref_table_3 ORDER BY id, value;

id             value

1              1
3              3
5              5
step s2-commit:
    COMMIT;

step s1-commit:
    COMMIT;

