Parsed test spec with 3 sessions starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-update s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-update: UPDATE isolation_table SET value = 5 WHERE id = 5; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500090 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500089|t | 0 57637|1500090|t | 1 57637|1500091|t | 0 57638|1500086|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 5 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-delete s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-delete: DELETE FROM isolation_table WHERE id = 5; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500098 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500097|t | 0 57637|1500098|t | 0 57637|1500099|t | 0 57638|1500094|t | 0 (4 rows) id|value --------------------------------------------------------------------- (0 rows) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-update-complex s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-update-complex: UPDATE isolation_table SET value = 5 WHERE id IN ( SELECT max(id) FROM isolation_table ); step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500106 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500105|t | 0 57637|1500106|t | 1 57637|1500107|t | 0 57638|1500102|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 5 (1 row) starting permutation: s1-load-cache s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-insert s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 0 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500114 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500113|t | 0 57637|1500114|t | 1 57637|1500115|t | 0 57638|1500110|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-copy s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 0 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-copy: COPY isolation_table FROM PROGRAM 'echo "1,1\n2,2\n3,3\n4,4\n5,5"' WITH CSV; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500122 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500121|t | 1 57637|1500122|t | 1 57637|1500123|t | 2 57638|1500118|t | 1 (4 rows) id|value --------------------------------------------------------------------- 1| 1 2| 2 3| 3 4| 4 5| 5 (5 rows) starting permutation: s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-update s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-update: UPDATE isolation_table SET value = 5 WHERE id = 5; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500130 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500129|t | 0 57637|1500130|t | 1 57637|1500131|t | 0 57638|1500126|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 5 (1 row) starting permutation: s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-delete s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-delete: DELETE FROM isolation_table WHERE id = 5; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500138 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500137|t | 0 57637|1500138|t | 0 57637|1500139|t | 0 57638|1500134|t | 0 (4 rows) id|value --------------------------------------------------------------------- (0 rows) starting permutation: s1-insert s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-update-complex s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 1 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-update-complex: UPDATE isolation_table SET value = 5 WHERE id IN ( SELECT max(id) FROM isolation_table ); step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500146 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500145|t | 0 57637|1500146|t | 1 57637|1500147|t | 0 57638|1500142|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 5 (1 row) starting permutation: s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-insert s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 0 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500154 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500153|t | 0 57637|1500154|t | 1 57637|1500155|t | 0 57638|1500150|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s3-acquire-advisory-lock s1-begin s1-select s2-begin s2-isolate-tenant s1-copy s1-commit s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s1-begin: BEGIN; -- the tests are written with the logic where single shard SELECTs -- do not to open transaction blocks SET citus.select_opens_transaction_block TO false; step s1-select: SELECT count(*) FROM isolation_table WHERE id = 5; count --------------------------------------------------------------------- 0 (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-copy: COPY isolation_table FROM PROGRAM 'echo "1,1\n2,2\n3,3\n4,4\n5,5"' WITH CSV; step s1-commit: COMMIT; step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500162 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500161|t | 1 57637|1500162|t | 1 57637|1500163|t | 2 57638|1500158|t | 1 (4 rows) id|value --------------------------------------------------------------------- 1| 1 2| 2 3| 3 4| 4 5| 5 (5 rows) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-isolate-tenant s1-isolate-tenant-same-coloc s3-release-advisory-lock s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-same-coloc: SELECT isolate_tenant_to_new_shard('isolation_table', 2, shard_transfer_mode => 'force_logical'); ERROR: could not acquire the lock required to split public.isolation_table step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500170 (1 row) step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500169|t | 0 57637|1500170|t | 1 57637|1500171|t | 0 57638|1500166|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-isolate-tenant s1-isolate-tenant-same-coloc-blocking s3-release-advisory-lock s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-same-coloc-blocking: SELECT isolate_tenant_to_new_shard('isolation_table', 2, shard_transfer_mode => 'block_writes'); ERROR: could not acquire the lock required to split public.isolation_table step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500178 (1 row) step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500177|t | 0 57637|1500178|t | 1 57637|1500179|t | 0 57638|1500174|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-isolate-tenant s1-isolate-tenant-no-same-coloc s3-release-advisory-lock s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-no-same-coloc: SELECT isolate_tenant_to_new_shard('isolation_table2', 2, shard_transfer_mode => 'force_logical'); ERROR: could not acquire the lock required to split concurrently public.isolation_table2. step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500186 (1 row) step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500185|t | 0 57637|1500186|t | 1 57637|1500187|t | 0 57638|1500182|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-begin s2-isolate-tenant s1-isolate-tenant-no-same-coloc s3-release-advisory-lock s2-commit s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-begin: BEGIN; step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-no-same-coloc: SELECT isolate_tenant_to_new_shard('isolation_table2', 2, shard_transfer_mode => 'force_logical'); ERROR: could not acquire the lock required to split concurrently public.isolation_table2. step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500197 (1 row) step s2-commit: COMMIT; step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500196|t | 0 57637|1500197|t | 1 57637|1500198|t | 0 57638|1500193|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-isolate-tenant s1-isolate-tenant-no-same-coloc-blocking s3-release-advisory-lock s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-no-same-coloc-blocking: SELECT isolate_tenant_to_new_shard('isolation_table2', 2, shard_transfer_mode => 'block_writes'); step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500208 (1 row) step s1-isolate-tenant-no-same-coloc-blocking: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500211 (1 row) step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500207|t | 0 57637|1500208|t | 1 57637|1500209|t | 0 57638|1500204|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row) starting permutation: s1-load-cache s1-insert s3-acquire-advisory-lock s2-isolate-tenant s1-isolate-tenant-no-same-coloc-blocking s3-release-advisory-lock s2-print-cluster create_distributed_table --------------------------------------------------------------------- (1 row) step s1-load-cache: TRUNCATE isolation_table; TRUNCATE isolation_table2; step s1-insert: INSERT INTO isolation_table VALUES (5, 10); INSERT INTO isolation_table2 VALUES (5, 10); step s3-acquire-advisory-lock: SELECT pg_advisory_lock(44000, 55152); pg_advisory_lock --------------------------------------------------------------------- (1 row) step s2-isolate-tenant: SELECT isolate_tenant_to_new_shard('isolation_table', 5, shard_transfer_mode => 'force_logical'); step s1-isolate-tenant-no-same-coloc-blocking: SELECT isolate_tenant_to_new_shard('isolation_table2', 2, shard_transfer_mode => 'block_writes'); step s3-release-advisory-lock: SELECT pg_advisory_unlock(44000, 55152); pg_advisory_unlock --------------------------------------------------------------------- t (1 row) step s2-isolate-tenant: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500219 (1 row) step s1-isolate-tenant-no-same-coloc-blocking: <... completed> isolate_tenant_to_new_shard --------------------------------------------------------------------- 1500222 (1 row) step s2-print-cluster: -- row count per shard SELECT nodeport, shardid, success, result FROM run_command_on_placements('isolation_table', 'select count(*) from %s') ORDER BY nodeport, shardid; -- rows SELECT id, value FROM isolation_table ORDER BY id, value; nodeport|shardid|success|result --------------------------------------------------------------------- 57637|1500218|t | 0 57637|1500219|t | 1 57637|1500220|t | 0 57638|1500215|t | 0 (4 rows) id|value --------------------------------------------------------------------- 5| 10 (1 row)