Parsed test spec with 2 sessions

starting permutation: s1-start-session-level-connection s1-worker-begin s1-worker-select s2-coordinator-citus_stat_activity s2-coordinator-citus_dist_stat_activity s2-coordinator-citus_stat_activity-in-workers s1-worker-commit s1-stop-session-level-connection
create_distributed_table
---------------------------------------------------------------------

(1 row)

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

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

(1 row)

step s1-worker-begin:
    SELECT run_commands_on_session_level_connection_to_node('BEGIN');

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

(1 row)

step s1-worker-select:
    SELECT run_commands_on_session_level_connection_to_node('SET citus.enable_local_execution TO off; SET citus.force_max_query_parallelization TO ON; SELECT * FROM dist_table');

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

(1 row)

step s2-coordinator-citus_stat_activity:
    SELECT global_pid != 0 FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%' AND query NOT ILIKE '%run_commands_on_session_level_connection_to_node%';

?column?
---------------------------------------------------------------------
t
(1 row)

step s2-coordinator-citus_dist_stat_activity:
    SELECT query FROM citus_dist_stat_activity WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    )
    AND query NOT ILIKE '%run_commands_on_session_level_connection_to_node%'
    ORDER BY 1;

query
---------------------------------------------------------------------
SET citus.enable_local_execution TO off; SET citus.force_max_query_parallelization TO ON; SELECT * FROM dist_table
(1 row)

step s2-coordinator-citus_stat_activity-in-workers:
    SELECT query FROM citus_stat_activity WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    )
    AND is_worker_query = true
    AND backend_type = 'client backend'
    ORDER BY 1;

query
---------------------------------------------------------------------
SELECT a, b FROM public.dist_table_12345000 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345001 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345002 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345003 dist_table WHERE true
(4 rows)

step s1-worker-commit:
    SELECT run_commands_on_session_level_connection_to_node('COMMIT');

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

(1 row)

step s1-stop-session-level-connection:
    SELECT stop_session_level_connection_to_node();

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

(1 row)

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

(1 row)


starting permutation: s1-coordinator-begin s1-coordinator-select s2-coordinator-citus_stat_activity s2-coordinator-citus_dist_stat_activity s2-coordinator-citus_stat_activity-in-workers s2-coordinator-get_all_active_transactions s2-coordinator-get_global_active_transactions s1-coordinator-commit
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-coordinator-begin:
    BEGIN;

step s1-coordinator-select:
    SET citus.enable_local_execution TO off;
    SET citus.force_max_query_parallelization TO ON;
    SELECT * FROM dist_table;

a|b
---------------------------------------------------------------------
(0 rows)

step s2-coordinator-citus_stat_activity:
    SELECT global_pid != 0 FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%' AND query NOT ILIKE '%run_commands_on_session_level_connection_to_node%';

?column?
---------------------------------------------------------------------
t
(1 row)

step s2-coordinator-citus_dist_stat_activity:
    SELECT query FROM citus_dist_stat_activity WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    )
    AND query NOT ILIKE '%run_commands_on_session_level_connection_to_node%'
    ORDER BY 1;

query
---------------------------------------------------------------------

    SET citus.enable_local_execution TO off;
    SET citus.force_max_query_parallelization TO ON;
    SELECT * FROM dist_table;

(1 row)

step s2-coordinator-citus_stat_activity-in-workers:
    SELECT query FROM citus_stat_activity WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    )
    AND is_worker_query = true
    AND backend_type = 'client backend'
    ORDER BY 1;

query
---------------------------------------------------------------------
SELECT a, b FROM public.dist_table_12345000 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345001 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345002 dist_table WHERE true
SELECT a, b FROM public.dist_table_12345003 dist_table WHERE true
(4 rows)

step s2-coordinator-get_all_active_transactions:
    SELECT count(*) FROM get_all_active_transactions() WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    );

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

step s2-coordinator-get_global_active_transactions:
    SELECT count(*) FROM get_global_active_transactions() WHERE global_pid IN (
        SELECT global_pid FROM citus_stat_activity WHERE query LIKE '%SELECT * FROM dist\_table%'
    )
    AND transaction_number != 0;

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

step s1-coordinator-commit:
    COMMIT;

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

(1 row)

