mirror of https://github.com/citusdata/citus.git
909 lines
36 KiB
Plaintext
909 lines
36 KiB
Plaintext
Parsed test spec with 7 sessions
|
|
|
|
starting permutation: s2-lock-1-start s1-rebalance-c1-block-writes s7-get-progress s2-unlock-1-start s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-lock-1-start:
|
|
BEGIN;
|
|
DELETE FROM colocated1 WHERE test_id = 1;
|
|
DELETE FROM separate WHERE test_id = 1;
|
|
|
|
step s1-rebalance-c1-block-writes:
|
|
BEGIN;
|
|
SELECT * FROM get_rebalance_table_shards_plan('colocated1');
|
|
SELECT rebalance_table_shards('colocated1', shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 0| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 0| 1|move
|
|
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move
|
|
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move
|
|
(4 rows)
|
|
|
|
step s2-unlock-1-start:
|
|
ROLLBACK;
|
|
|
|
step s1-rebalance-c1-block-writes: <... completed>
|
|
table_name|shardid|shard_size|sourcename|sourceport|targetname|targetport
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500005| 0|localhost | 57637|localhost | 57638
|
|
colocated1|1500002| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500006| 0|localhost | 57637|localhost | 57638
|
|
(4 rows)
|
|
|
|
rebalance_table_shards
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s3-lock-2-start s1-rebalance-c1-block-writes s7-get-progress s3-unlock-2-start s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s3-lock-2-start:
|
|
BEGIN;
|
|
DELETE FROM colocated1 WHERE test_id = 3;
|
|
|
|
step s1-rebalance-c1-block-writes:
|
|
BEGIN;
|
|
SELECT * FROM get_rebalance_table_shards_plan('colocated1');
|
|
SELECT rebalance_table_shards('colocated1', shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 0|localhost | 57638| 50000| 2|move
|
|
colocated2|1500005| 400000|localhost | 57637| 0|localhost | 57638| 400000| 2|move
|
|
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 1|move
|
|
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 1|move
|
|
(4 rows)
|
|
|
|
step s3-unlock-2-start:
|
|
ROLLBACK;
|
|
|
|
step s1-rebalance-c1-block-writes: <... completed>
|
|
table_name|shardid|shard_size|sourcename|sourceport|targetname|targetport
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500005| 0|localhost | 57637|localhost | 57638
|
|
colocated1|1500002| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500006| 0|localhost | 57637|localhost | 57638
|
|
(4 rows)
|
|
|
|
rebalance_table_shards
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s7-grab-lock s1-rebalance-c1-block-writes s7-get-progress s7-release-lock s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s7-grab-lock:
|
|
BEGIN;
|
|
SET LOCAL citus.max_adaptive_executor_pool_size = 1;
|
|
SELECT 1 FROM colocated1 LIMIT 1;
|
|
SELECT 1 FROM separate LIMIT 1;
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-rebalance-c1-block-writes:
|
|
BEGIN;
|
|
SELECT * FROM get_rebalance_table_shards_plan('colocated1');
|
|
SELECT rebalance_table_shards('colocated1', shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 50000| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 400000| 1|move
|
|
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move
|
|
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move
|
|
(4 rows)
|
|
|
|
step s7-release-lock:
|
|
COMMIT;
|
|
|
|
step s1-rebalance-c1-block-writes: <... completed>
|
|
table_name|shardid|shard_size|sourcename|sourceport|targetname|targetport
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500005| 0|localhost | 57637|localhost | 57638
|
|
colocated1|1500002| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500006| 0|localhost | 57637|localhost | 57638
|
|
(4 rows)
|
|
|
|
rebalance_table_shards
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s6-acquire-advisory-lock s1-rebalance-c1-online s7-get-progress s6-release-advisory-lock s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s6-acquire-advisory-lock:
|
|
SELECT pg_advisory_lock(44000, 55152);
|
|
|
|
pg_advisory_lock
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-rebalance-c1-online:
|
|
BEGIN;
|
|
SELECT * FROM get_rebalance_table_shards_plan('colocated1');
|
|
SELECT rebalance_table_shards('colocated1', shard_transfer_mode:='force_logical');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 8000| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 8000| 1|move
|
|
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move
|
|
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move
|
|
(4 rows)
|
|
|
|
step s6-release-advisory-lock:
|
|
SELECT pg_advisory_unlock(44000, 55152);
|
|
|
|
pg_advisory_unlock
|
|
---------------------------------------------------------------------
|
|
t
|
|
(1 row)
|
|
|
|
step s1-rebalance-c1-online: <... completed>
|
|
table_name|shardid|shard_size|sourcename|sourceport|targetname|targetport
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500005| 0|localhost | 57637|localhost | 57638
|
|
colocated1|1500002| 0|localhost | 57637|localhost | 57638
|
|
colocated2|1500006| 0|localhost | 57637|localhost | 57638
|
|
(4 rows)
|
|
|
|
rebalance_table_shards
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s2-lock-1-start s1-shard-move-c1-block-writes s7-get-progress s2-unlock-1-start s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-lock-1-start:
|
|
BEGIN;
|
|
DELETE FROM colocated1 WHERE test_id = 1;
|
|
DELETE FROM separate WHERE test_id = 1;
|
|
|
|
step s1-shard-move-c1-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 0| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 0| 1|move
|
|
(2 rows)
|
|
|
|
step s2-unlock-1-start:
|
|
ROLLBACK;
|
|
|
|
step s1-shard-move-c1-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s7-grab-lock s1-shard-move-c1-block-writes s7-get-progress s7-release-lock s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s7-grab-lock:
|
|
BEGIN;
|
|
SET LOCAL citus.max_adaptive_executor_pool_size = 1;
|
|
SELECT 1 FROM colocated1 LIMIT 1;
|
|
SELECT 1 FROM separate LIMIT 1;
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-shard-move-c1-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 50000| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 400000| 1|move
|
|
(2 rows)
|
|
|
|
step s7-release-lock:
|
|
COMMIT;
|
|
|
|
step s1-shard-move-c1-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s2-lock-1-start s1-shard-copy-c1-block-writes s7-get-progress s2-unlock-1-start s1-commit
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-lock-1-start:
|
|
BEGIN;
|
|
DELETE FROM colocated1 WHERE test_id = 1;
|
|
DELETE FROM separate WHERE test_id = 1;
|
|
|
|
step s1-shard-copy-c1-block-writes:
|
|
BEGIN;
|
|
UPDATE pg_dist_partition SET repmodel = 'c' WHERE logicalrelid IN ('colocated1', 'colocated2');
|
|
SELECT citus_copy_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 0| 1|copy
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 0| 1|copy
|
|
(2 rows)
|
|
|
|
step s2-unlock-1-start:
|
|
ROLLBACK;
|
|
|
|
step s1-shard-copy-c1-block-writes: <... completed>
|
|
citus_copy_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
|
|
starting permutation: s6-acquire-advisory-lock s1-shard-move-c1-online s7-get-progress s6-release-advisory-lock s1-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s6-acquire-advisory-lock:
|
|
SELECT pg_advisory_lock(44000, 55152);
|
|
|
|
pg_advisory_lock
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-shard-move-c1-online:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='force_logical');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 8000| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 8000| 1|move
|
|
(2 rows)
|
|
|
|
step s6-release-advisory-lock:
|
|
SELECT pg_advisory_unlock(44000, 55152);
|
|
|
|
pg_advisory_unlock
|
|
---------------------------------------------------------------------
|
|
t
|
|
(1 row)
|
|
|
|
step s1-shard-move-c1-online: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s6-acquire-advisory-lock s1-shard-copy-c1-online s7-get-progress s6-release-advisory-lock s1-commit
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s6-acquire-advisory-lock:
|
|
SELECT pg_advisory_lock(44000, 55152);
|
|
|
|
pg_advisory_lock
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-shard-copy-c1-online:
|
|
BEGIN;
|
|
UPDATE pg_dist_partition SET repmodel = 'c' WHERE logicalrelid IN ('colocated1', 'colocated2');
|
|
SELECT citus_copy_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, transfer_mode:='force_logical');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 8000| 1|copy
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 8000| 1|copy
|
|
(2 rows)
|
|
|
|
step s6-release-advisory-lock:
|
|
SELECT pg_advisory_unlock(44000, 55152);
|
|
|
|
pg_advisory_unlock
|
|
---------------------------------------------------------------------
|
|
t
|
|
(1 row)
|
|
|
|
step s1-shard-copy-c1-online: <... completed>
|
|
citus_copy_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
|
|
starting permutation: s2-lock-1-start s1-shard-move-c1-block-writes s4-shard-move-sep-block-writes s7-get-progress s2-unlock-1-start s1-commit s4-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s2-lock-1-start:
|
|
BEGIN;
|
|
DELETE FROM colocated1 WHERE test_id = 1;
|
|
DELETE FROM separate WHERE test_id = 1;
|
|
|
|
step s1-shard-move-c1-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s4-shard-move-sep-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500009, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 0| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 0| 1|move
|
|
separate |1500009| 50000|localhost | 57637| 50000|localhost | 57638| 0| 1|move
|
|
(3 rows)
|
|
|
|
step s2-unlock-1-start:
|
|
ROLLBACK;
|
|
|
|
step s1-shard-move-c1-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s4-shard-move-sep-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s4-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|
|
|
|
starting permutation: s7-grab-lock s1-shard-move-c1-block-writes s4-shard-move-sep-block-writes s7-get-progress s7-release-lock s1-commit s4-commit s7-get-progress enable-deferred-drop
|
|
master_set_node_property
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s7-grab-lock:
|
|
BEGIN;
|
|
SET LOCAL citus.max_adaptive_executor_pool_size = 1;
|
|
SELECT 1 FROM colocated1 LIMIT 1;
|
|
SELECT 1 FROM separate LIMIT 1;
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
?column?
|
|
---------------------------------------------------------------------
|
|
1
|
|
(1 row)
|
|
|
|
step s1-shard-move-c1-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s4-shard-move-sep-block-writes:
|
|
BEGIN;
|
|
SELECT citus_move_shard_placement(1500009, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
|
|
<waiting ...>
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
colocated1|1500001| 50000|localhost | 57637| 50000|localhost | 57638| 50000| 1|move
|
|
colocated2|1500005| 400000|localhost | 57637| 400000|localhost | 57638| 400000| 1|move
|
|
separate |1500009| 50000|localhost | 57637| 50000|localhost | 57638| 200000| 1|move
|
|
(3 rows)
|
|
|
|
step s7-release-lock:
|
|
COMMIT;
|
|
|
|
step s1-shard-move-c1-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s4-shard-move-sep-block-writes: <... completed>
|
|
citus_move_shard_placement
|
|
---------------------------------------------------------------------
|
|
|
|
(1 row)
|
|
|
|
step s1-commit:
|
|
COMMIT;
|
|
|
|
step s4-commit:
|
|
COMMIT;
|
|
|
|
step s7-get-progress:
|
|
set LOCAL client_min_messages=NOTICE;
|
|
WITH possible_sizes(size) as (VALUES (0), (8000), (50000), (200000), (400000))
|
|
SELECT
|
|
table_name,
|
|
shardid,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - shard_size) = (SELECT MIN(ABS(size - shard_size)) FROM possible_sizes )) shard_size,
|
|
sourcename,
|
|
sourceport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - source_shard_size) = (SELECT MIN(ABS(size - source_shard_size)) FROM possible_sizes )) source_shard_size,
|
|
targetname,
|
|
targetport,
|
|
( SELECT size FROM possible_sizes WHERE ABS(size - target_shard_size) = (SELECT MIN(ABS(size - target_shard_size)) FROM possible_sizes )) target_shard_size,
|
|
progress,
|
|
operation_type
|
|
FROM get_rebalance_progress();
|
|
|
|
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type
|
|
---------------------------------------------------------------------
|
|
(0 rows)
|
|
|
|
step enable-deferred-drop:
|
|
ALTER SYSTEM RESET citus.defer_drop_after_shard_move;
|
|
|