Parsed test spec with 2 sessions

starting permutation: s1-load-cache s1-insert s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-update s2-commit s1-commit s2-print-content
step s1-load-cache:
	TRUNCATE test_copy_placement_vs_modification;

step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

1
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-update:
	UPDATE test_copy_placement_vs_modification SET y = 5 WHERE x = 5;
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              5
57638          t              5

starting permutation: s1-load-cache s1-insert s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-delete s2-commit s1-commit s2-print-content
step s1-load-cache:
	TRUNCATE test_copy_placement_vs_modification;

step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

1
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-delete:
	DELETE FROM test_copy_placement_vs_modification WHERE x = 5;
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t
57638          t

starting permutation: s1-load-cache s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-insert s2-commit s1-commit s2-print-content
step s1-load-cache:
	TRUNCATE test_copy_placement_vs_modification;

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              10
57638          t              10

starting permutation: s1-load-cache s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-copy s2-commit s1-commit s2-print-content
step s1-load-cache:
	TRUNCATE test_copy_placement_vs_modification;

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-copy:
	COPY test_copy_placement_vs_modification FROM PROGRAM 'echo 1,1 && echo 2,2 && echo 3,3 && echo 4,4 && echo 5,5' WITH CSV;
 <waiting ...>
step s2-commit:
	COMMIT;

step s1-copy: <... completed>
step s1-commit:
	COMMIT;

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              5
57638          t              5

starting permutation: s1-load-cache s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-ddl s2-commit s1-commit s2-print-index-count
step s1-load-cache:
	TRUNCATE test_copy_placement_vs_modification;

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-ddl:
	CREATE INDEX test_copy_placement_vs_modification_index ON test_copy_placement_vs_modification(x);
 <waiting ...>
step s2-commit:
	COMMIT;

step s1-ddl: <... completed>
step s1-commit:
	COMMIT;

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

nodeport       success        result

57637          t              1
57637          t              1
57638          t              1
57638          t              1

starting permutation: s1-insert s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-update s2-commit s1-commit s2-print-content
step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

1
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-update:
	UPDATE test_copy_placement_vs_modification SET y = 5 WHERE x = 5;
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              5
57638          t              5

starting permutation: s1-insert s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-delete s2-commit s1-commit s2-print-content
step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);

step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

1
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-delete:
	DELETE FROM test_copy_placement_vs_modification WHERE x = 5;
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t
57638          t

starting permutation: s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-insert s2-commit s1-commit s2-print-content
step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-insert:
	INSERT INTO test_copy_placement_vs_modification VALUES (5, 10);
 <waiting ...>
step s2-commit:
	COMMIT;

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

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              10
57638          t              10

starting permutation: s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-copy s2-commit s1-commit s2-print-content
step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-copy:
	COPY test_copy_placement_vs_modification FROM PROGRAM 'echo 1,1 && echo 2,2 && echo 3,3 && echo 4,4 && echo 5,5' WITH CSV;
 <waiting ...>
step s2-commit:
	COMMIT;

step s1-copy: <... completed>
step s1-commit:
	COMMIT;

step s2-print-content:
	SELECT
		nodeport, success, result
	FROM
		run_command_on_placements('test_copy_placement_vs_modification', 'select y from %s WHERE x = 5')
	WHERE
		shardid IN (SELECT * FROM selected_shard)
	ORDER BY
		nodeport;

nodeport       success        result

57637          t              5
57638          t              5

starting permutation: s1-begin s1-select s2-set-placement-inactive s2-begin s2-repair-placement s1-ddl s2-commit s1-commit s2-print-index-count
step s1-begin:
    BEGIN;
	SET LOCAL citus.select_opens_transaction_block TO off;

step s1-select:
	SELECT count(*) FROM test_copy_placement_vs_modification WHERE x = 5;

count

0
step s2-set-placement-inactive:
	UPDATE pg_dist_shard_placement SET shardstate = 3 WHERE shardid IN (SELECT * FROM selected_shard) AND nodeport = 57638;

step s2-begin:
	BEGIN;

step s2-repair-placement:
	SELECT master_copy_shard_placement((SELECT * FROM selected_shard), 'localhost', 57637, 'localhost', 57638);

master_copy_shard_placement


step s1-ddl:
	CREATE INDEX test_copy_placement_vs_modification_index ON test_copy_placement_vs_modification(x);
 <waiting ...>
step s2-commit:
	COMMIT;

step s1-ddl: <... completed>
step s1-commit:
	COMMIT;

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

nodeport       success        result

57637          t              1
57637          t              1
57638          t              1
57638          t              1
