Parsed test spec with 3 sessions

starting permutation: coor-begin coor-acquire-aggresive-lock-on-dist-table w1-start-session-level-connection w1-begin w1-read-dist-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-dist-table:
 LOCK dist_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM dist_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-dist-table w1-start-session-level-connection w1-begin w1-acquire-aggressive-lock-dist-table coor-rollback coor-read-dist-table w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-dist-table:
 LOCK dist_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-read-dist-table:
 SELECT COUNT(*) FROM dist_table;
 <waiting ...>
step w1-rollback: 
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-read-dist-table: <... completed>
count
---------------------------------------------------------------------
    5
(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: w1-start-session-level-connection w1-begin w1-acquire-aggressive-lock-dist-table coor-begin coor-acquire-aggresive-lock-on-dist-table-nowait coor-rollback w1-rollback w1-stop-connection
step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-dist-table-nowait:
 LOCK dist_table IN ACCESS EXCLUSIVE MODE NOWAIT;

ERROR:  could not obtain lock on relation "public.dist_table"
step coor-rollback:
 ROLLBACK;

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: w1-start-session-level-connection w1-begin w2-start-session-level-connection w2-begin w1-acquire-aggressive-lock-dist-table w2-acquire-aggressive-lock-dist-table w1-rollback w1-read-dist-table w2-rollback w1-stop-connection w2-stop-connection
step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57638);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step w1-rollback: 
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM dist_table');
 <waiting ...>
step w2-rollback: 
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-weak-lock-on-dist-table w1-start-session-level-connection w1-begin w1-read-dist-table w1-acquire-aggressive-lock-dist-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-weak-lock-on-dist-table:
 LOCK dist_table IN ACCESS SHARE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM dist_table');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: w1-start-session-level-connection w1-begin w1-lock-reference-table coor-begin coor-read-ref-table w1-rollback coor-rollback w1-stop-connection
step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-lock-reference-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK ref_table IN ACCESS EXCLUSIVE MODE');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-begin:
 BEGIN;

step coor-read-ref-table:
 SELECT COUNT(*) FROM ref_table;
 <waiting ...>
step w1-rollback: 
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-read-ref-table: <... completed>
count
---------------------------------------------------------------------
    5
(1 row)

step coor-rollback:
 ROLLBACK;

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-view w1-start-session-level-connection w1-begin w1-read-dist-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-view:
 LOCK main_view IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM dist_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-view w1-start-session-level-connection w1-begin w1-acquire-aggressive-lock-dist-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-view:
 LOCK main_view IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-view w1-start-session-level-connection w1-begin w1-read-ref-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-view:
 LOCK main_view IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-ref-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM ref_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-ref-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-only-view w1-start-session-level-connection w1-begin w1-read-ref-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-only-view:
 LOCK ONLY main_view IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-ref-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM ref_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-ref-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: w1-start-session-level-connection w1-begin w1-acquire-aggressive-lock-dist-table coor-begin coor-acquire-aggresive-lock-on-view-nowait coor-rollback w1-rollback w1-stop-connection
step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-view-nowait:
 LOCK main_view IN ACCESS EXCLUSIVE MODE NOWAIT;

ERROR:  could not obtain lock on relation "dist_table"
step coor-rollback:
 ROLLBACK;

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-lock-all w1-start-session-level-connection w1-begin w1-read-citus-local-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-lock-all:
 LOCK dist_table, citus_local_table, ref_table, main_view, sub_view, local_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-citus-local-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM citus_local_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-citus-local-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-partitioned-table w1-start-session-level-connection w1-begin w1-read-partitioned-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-partitioned-table:
 LOCK partitioned_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-partitioned-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM partitioned_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-partitioned-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-partitioned-table w1-start-session-level-connection w1-begin w1-read-partition-of-partitioned-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-partitioned-table:
 LOCK partitioned_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-partition-of-partitioned-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM partition_1');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-partition-of-partitioned-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-partitioned-table-with-*-syntax w1-start-session-level-connection w1-begin w1-read-partition-of-partitioned-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-partitioned-table-with-*-syntax:
 LOCK partitioned_table * IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-partition-of-partitioned-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM partition_1');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-partition-of-partitioned-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-only-partitioned-table w1-start-session-level-connection w1-begin w1-read-partitioned-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-only-partitioned-table:
 LOCK ONLY partitioned_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-partitioned-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM partitioned_table');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-partitioned-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-only-partitioned-table w1-start-session-level-connection w1-begin w1-read-partition-of-partitioned-table coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-only-partitioned-table:
 LOCK ONLY partitioned_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-partition-of-partitioned-table:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM partition_1');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step coor-rollback:
 ROLLBACK;

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-acquire-aggresive-lock-on-ref-table w1-start-session-level-connection w1-begin w1-read-main-view coor-rollback w1-rollback w1-stop-connection
step coor-begin:
 BEGIN;

step coor-acquire-aggresive-lock-on-ref-table:
 LOCK ref_table IN ACCESS EXCLUSIVE MODE;

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-read-main-view:
 SELECT run_commands_on_session_level_connection_to_node('SELECT COUNT(*) FROM main_view');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w1-read-main-view: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)


starting permutation: coor-begin coor-read-dist-table w2-start-session-level-connection w2-begin w1-start-session-level-connection w1-begin w2-acquire-aggressive-lock-dist-table w1-acquire-aggressive-lock-dist-table coor-rollback w2-rollback w1-rollback w1-stop-connection w2-stop-connection
step coor-begin:
 BEGIN;

step coor-read-dist-table:
 SELECT COUNT(*) FROM dist_table;

count
---------------------------------------------------------------------
    5
(1 row)

step w2-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57638);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-start-session-level-connection:
    SELECT start_session_level_connection_to_node('localhost', 57637);

start_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-begin:
 SELECT run_commands_on_session_level_connection_to_node('BEGIN');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-acquire-aggressive-lock-dist-table:
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step w1-acquire-aggressive-lock-dist-table: 
 SELECT run_commands_on_session_level_connection_to_node('LOCK dist_table IN ACCESS EXCLUSIVE MODE');
 <waiting ...>
step coor-rollback: 
 ROLLBACK;

step w2-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-acquire-aggressive-lock-dist-table: <... completed>
run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-rollback:
 SELECT run_commands_on_session_level_connection_to_node('ROLLBACK');

run_commands_on_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w1-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

step w2-stop-connection:
 SELECT stop_session_level_connection_to_node();

stop_session_level_connection_to_node
---------------------------------------------------------------------

(1 row)

citus_remove_node
---------------------------------------------------------------------

(1 row)

