Parsed test spec with 2 sessions

starting permutation: s2-load-metadata-cache s1-begin s1-add-second-worker s2-copy-to-reference-table s1-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-copy-to-reference-table:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-copy-to-reference-table: <... completed>
step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |    10
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s2-begin s2-copy-to-reference-table s1-add-second-worker s2-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s2-begin:
 BEGIN;

step s2-copy-to-reference-table:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |    10
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s1-begin s1-add-second-worker s2-insert-to-reference-table s1-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-insert-to-reference-table:
 INSERT INTO test_reference_table VALUES (6);
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-insert-to-reference-table: <... completed>
step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     6
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s2-begin s2-insert-to-reference-table s1-add-second-worker s2-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s2-begin:
 BEGIN;

step s2-insert-to-reference-table:
 INSERT INTO test_reference_table VALUES (6);

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     6
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s1-begin s1-add-second-worker s2-ddl-on-reference-table s1-commit s2-print-index-count
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-ddl-on-reference-table:
 CREATE INDEX reference_index ON test_reference_table(test_id);
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-ddl-on-reference-table: <... completed>
step s2-print-index-count:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from pg_indexes WHERE tablename = ''%s''')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s2-begin s2-ddl-on-reference-table s1-add-second-worker s2-commit s2-print-index-count
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s2-begin:
 BEGIN;

step s2-ddl-on-reference-table:
 CREATE INDEX reference_index ON test_reference_table(test_id);

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-index-count:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from pg_indexes WHERE tablename = ''%s''')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s1-begin s1-add-second-worker s2-create-reference-table-2 s1-commit s2-print-content-2
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-create-reference-table-2:
 SELECT create_reference_table('test_reference_table_2');
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-create-reference-table-2: <... completed>
create_reference_table
---------------------------------------------------------------------

(1 row)

step s2-print-content-2:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table_2', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
   57638|t      |     1
(2 rows)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-load-metadata-cache s2-begin s2-create-reference-table-2 s1-add-second-worker s2-commit s2-print-content-2
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-load-metadata-cache:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s2-begin:
 BEGIN;

step s2-create-reference-table-2:
 SELECT create_reference_table('test_reference_table_2');

create_reference_table
---------------------------------------------------------------------

(1 row)

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content-2:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table_2', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s1-begin s1-add-second-worker s2-copy-to-reference-table s1-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-copy-to-reference-table:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-copy-to-reference-table: <... completed>
step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     5
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-begin s2-copy-to-reference-table s1-add-second-worker s2-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-copy-to-reference-table:
 COPY test_reference_table FROM PROGRAM 'echo 1 && echo 2 && echo 3 && echo 4 && echo 5';

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     5
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s1-begin s1-add-second-worker s2-insert-to-reference-table s1-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-insert-to-reference-table:
 INSERT INTO test_reference_table VALUES (6);
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-insert-to-reference-table: <... completed>
step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-begin s2-insert-to-reference-table s1-add-second-worker s2-commit s2-print-content
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-insert-to-reference-table:
 INSERT INTO test_reference_table VALUES (6);

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s1-begin s1-add-second-worker s2-ddl-on-reference-table s1-commit s2-print-index-count
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-ddl-on-reference-table:
 CREATE INDEX reference_index ON test_reference_table(test_id);
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-ddl-on-reference-table: <... completed>
step s2-print-index-count:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from pg_indexes WHERE tablename = ''%s''')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-begin s2-ddl-on-reference-table s1-add-second-worker s2-commit s2-print-index-count
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-ddl-on-reference-table:
 CREATE INDEX reference_index ON test_reference_table(test_id);

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-index-count:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table', 'select count(*) from pg_indexes WHERE tablename = ''%s''')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s1-begin s1-add-second-worker s2-create-reference-table-2 s1-commit s2-print-content-2
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-begin:
    BEGIN;

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-create-reference-table-2:
 SELECT create_reference_table('test_reference_table_2');
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-create-reference-table-2: <... completed>
create_reference_table
---------------------------------------------------------------------

(1 row)

step s2-print-content-2:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table_2', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
   57638|t      |     1
(2 rows)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s2-begin s2-create-reference-table-2 s1-add-second-worker s2-commit s2-print-content-2
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s2-begin:
 BEGIN;

step s2-create-reference-table-2:
 SELECT create_reference_table('test_reference_table_2');

create_reference_table
---------------------------------------------------------------------

(1 row)

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);
 <waiting ...>
step s2-commit: 
 COMMIT;

step s1-add-second-worker: <... completed>
?column?
---------------------------------------------------------------------
       1
(1 row)

step s2-print-content-2:
 SELECT
  nodeport, success, result
 FROM
  run_command_on_placements('test_reference_table_2', 'select count(*) from %s')
 ORDER BY
  nodeport;

nodeport|success|result
---------------------------------------------------------------------
   57637|t      |     1
(1 row)

master_remove_node
---------------------------------------------------------------------


(2 rows)


starting permutation: s1-add-second-worker s2-begin s1-begin s1-drop-reference-table s2-replicate-reference-tables s1-commit s2-commit
create_distributed_table
---------------------------------------------------------------------

(1 row)

step s1-add-second-worker:
 SELECT 1 FROM master_add_node('localhost', 57638);

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

step s2-begin:
 BEGIN;

step s1-begin:
    BEGIN;

step s1-drop-reference-table:
 DROP TABLE test_reference_table;

step s2-replicate-reference-tables:
 SET client_min_messages TO DEBUG2;
 SELECT replicate_reference_tables();
 RESET client_min_messages;
 <waiting ...>
step s1-commit: 
    COMMIT;

step s2-replicate-reference-tables: <... completed>
replicate_reference_tables
---------------------------------------------------------------------

(1 row)

step s2-commit:
 COMMIT;

master_remove_node
---------------------------------------------------------------------


(2 rows)

