Parsed test spec with 3 sessions

starting permutation: s1-insert-table-1 s3-acquire-advisory-lock s2-begin s2-move-shards s1-delete-table-1 s3-release-advisory-lock s2-commit s1-select-table-1 s1-select-dist-table
step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s3-acquire-advisory-lock:
    SELECT pg_advisory_lock(44000, 55152);

pg_advisory_lock
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-delete-table-1: 
    DELETE FROM ref_table_1 WHERE value = 5;

step s3-release-advisory-lock:
    SELECT pg_advisory_unlock(44000, 55152);

pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 7|    7
 9|    9
11|   11
(5 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 7|    7
 9|    9
11|   11
(5 rows)


starting permutation: s1-insert-table-1 s3-acquire-advisory-lock s2-begin s2-move-shards s1-update-table-1 s3-release-advisory-lock s2-commit s1-select-table-1 s1-select-dist-table
step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s3-acquire-advisory-lock:
    SELECT pg_advisory_lock(44000, 55152);

pg_advisory_lock
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-update-table-1: 
    UPDATE ref_table_1 SET id = id + 1 WHERE value = 5;

step s3-release-advisory-lock:
    SELECT pg_advisory_unlock(44000, 55152);

pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 6|    5
 7|    7
 9|    9
11|   11
(6 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    6
 7|    7
 9|    9
11|   11
(6 rows)


starting permutation: s3-acquire-advisory-lock s2-begin s2-move-shards s1-insert-table-1 s3-release-advisory-lock s2-commit s1-select-table-1 s1-select-dist-table
step s3-acquire-advisory-lock:
    SELECT pg_advisory_lock(44000, 55152);

pg_advisory_lock
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-insert-table-1: 
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s3-release-advisory-lock:
    SELECT pg_advisory_unlock(44000, 55152);

pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    5
 7|    7
 9|    9
11|   11
(6 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    5
 7|    7
 9|    9
11|   11
(6 rows)


starting permutation: s1-insert-table-1 s3-acquire-advisory-lock s2-begin s2-move-shards s1-select-table-1 s3-release-advisory-lock s2-commit
step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s3-acquire-advisory-lock:
    SELECT pg_advisory_lock(44000, 55152);

pg_advisory_lock
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-select-table-1: 
    SELECT * FROM ref_table_1 ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    5
 7|    7
 9|    9
11|   11
(6 rows)

step s3-release-advisory-lock:
    SELECT pg_advisory_unlock(44000, 55152);

pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;


starting permutation: s1-insert-table-1 s2-begin s1-begin s1-delete-table-1 s2-move-shards s1-commit s2-commit s1-select-table-1 s1-select-dist-table
step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s2-begin:
 BEGIN;

step s1-begin:
 BEGIN;

step s1-delete-table-1:
    DELETE FROM ref_table_1 WHERE value = 5;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 7|    7
 9|    9
11|   11
(5 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 7|    7
 9|    9
11|   11
(5 rows)


starting permutation: s1-insert-table-1 s2-begin s1-begin s1-update-table-1 s2-move-shards s1-commit s2-commit s1-select-table-1 s1-select-dist-table
step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s2-begin:
 BEGIN;

step s1-begin:
 BEGIN;

step s1-update-table-1:
    UPDATE ref_table_1 SET id = id + 1 WHERE value = 5;

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 6|    5
 7|    7
 9|    9
11|   11
(6 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    6
 7|    7
 9|    9
11|   11
(6 rows)


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

step s1-begin:
 BEGIN;

step s1-insert-table-1:
    INSERT INTO ref_table_2 VALUES (5);
    INSERT INTO dist_table VALUES (5, 5);

step s2-move-shards:
    SELECT master_move_shard_placement((SELECT * FROM selected_shard_for_dist_table), 'localhost', 57637, 'localhost', 57638, 'force_logical');
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-move-shards: <... completed>
master_move_shard_placement
---------------------------------------------------------------------

(1 row)

step s2-commit:
    COMMIT;

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

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    5
 7|    7
 9|    9
11|   11
(6 rows)

step s1-select-dist-table:
    SELECT * FROM dist_table ORDER BY id, value;

id|value
---------------------------------------------------------------------
 1|    1
 3|    3
 5|    5
 7|    7
 9|    9
11|   11
(6 rows)

