citus/src/test/regress/expected/isolation_shard_rebalancer_...

1304 lines
58 KiB
Plaintext

Parsed test spec with 6 sessions
starting permutation: s5-acquire-advisory-lock-before-copy s1-rebalance-c1-block-writes s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-rebalance-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|move |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|move |t |t |f |Copying Data
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
(4 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-rebalance-c1-block-writes: <... completed>
rebalance_table_shards
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s3-lock-2-start s1-rebalance-c1-block-writes s7-get-progress s3-unlock-2-start s1-wait s7-get-progress
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:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 2|move |t |t |f |Completed
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 2|move |t |t |f |Completed
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 1|move |t |t |f |Setting Up
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 1|move |t |t |f |Setting Up
(4 rows)
step s3-unlock-2-start:
ROLLBACK;
step s1-rebalance-c1-block-writes: <... completed>
rebalance_table_shards
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-rebalance-c1-block-writes s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-rebalance-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|move |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|move |t |t |f |Copying Data
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
(4 rows)
step s6-release-advisory-lock:
SELECT pg_advisory_unlock(44000, 55152);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-rebalance-c1-block-writes: <... completed>
rebalance_table_shards
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-rebalance-c1-online s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-rebalance-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|move |t |t |f |Setting Up
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|move |t |t |f |Setting Up
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
(4 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-rebalance-c1-online: <... completed>
rebalance_table_shards
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-rebalance-c1-online s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-rebalance-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|move |t |t |t |Final Catchup
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|move |t |t |t |Final Catchup
colocated1|1500002| 200000|localhost | 57637| 200000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
colocated2|1500006| 8000|localhost | 57637| 8000|localhost | 57638| 0| 0|move |t |t |f |Not Started Yet
(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>
rebalance_table_shards
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-shard-move-c1-block-writes s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|move |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|move |t |t |f |Copying Data
(2 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-move-c1-block-writes: <... completed>
citus_move_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-shard-move-c1-block-writes s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|move |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|move |t |t |f |Copying Data
(2 rows)
step s6-release-advisory-lock:
SELECT pg_advisory_unlock(44000, 55152);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-move-c1-block-writes: <... completed>
citus_move_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-shard-copy-c1-block-writes s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-copy-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|copy |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|copy |t |t |f |Copying Data
(2 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-copy-c1-block-writes: <... completed>
citus_copy_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-shard-copy-c1-block-writes s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-copy-c1-block-writes:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|copy |t |t |f |Copying Data
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|copy |t |t |f |Copying Data
(2 rows)
step s6-release-advisory-lock:
SELECT pg_advisory_unlock(44000, 55152);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-copy-c1-block-writes: <... completed>
citus_copy_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-shard-move-c1-online s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|move |t |t |f |Setting Up
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|move |t |t |f |Setting Up
(2 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-move-c1-online: <... completed>
citus_move_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-shard-move-c1-online s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|move |t |t |t |Final Catchup
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|move |t |t |t |Final Catchup
(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-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-shard-copy-c1-online s7-get-progress s5-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-copy-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|copy |t |t |f |Setting Up
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|copy |t |t |f |Setting Up
(2 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
step s1-shard-copy-c1-online: <... completed>
citus_copy_shard_placement
---------------------------------------------------------------------
(1 row)
step s1-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-shard-copy-c1-online s7-get-progress s6-release-advisory-lock s1-wait s7-get-progress
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-copy-c1-online:
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), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|copy |t |t |t |Final Catchup
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|copy |t |t |t |Final Catchup
(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-wait:
step s7-get-progress:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available,
status
FROM get_rebalance_progress();
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available|status
---------------------------------------------------------------------
(0 rows)
starting permutation: s5-acquire-advisory-lock-before-copy s1-shard-move-c1-block-writes s4-shard-move-sep-block-writes s7-get-progress-ordered s5-release-advisory-lock s1-wait s4-wait s7-get-progress-ordered
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s5-acquire-advisory-lock-before-copy:
SELECT pg_advisory_lock(55152, 44000);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-block-writes:
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
<waiting ...>
step s4-shard-move-sep-block-writes:
SELECT citus_move_shard_placement(1500009, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
<waiting ...>
step s7-get-progress-ordered:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available
FROM get_rebalance_progress()
ORDER BY 1, 2, 3, 4, 5;
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 8000| 1|move |t |t |f
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 8000| 1|move |t |t |f
separate |1500009| 200000|localhost | 57637| 200000|localhost | 57638| 8000| 1|move |t |t |f
(3 rows)
step s5-release-advisory-lock:
SELECT pg_advisory_unlock(55152, 44000);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
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-wait:
step s4-wait:
step s7-get-progress-ordered:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available
FROM get_rebalance_progress()
ORDER BY 1, 2, 3, 4, 5;
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available
---------------------------------------------------------------------
(0 rows)
starting permutation: s6-acquire-advisory-lock-after-copy s1-shard-move-c1-block-writes s4-shard-move-sep-block-writes s7-get-progress-ordered s6-release-advisory-lock s1-wait s4-wait s7-get-progress-ordered
master_set_node_property
---------------------------------------------------------------------
(1 row)
step s6-acquire-advisory-lock-after-copy:
SELECT pg_advisory_lock(44000, 55152);
pg_advisory_lock
---------------------------------------------------------------------
(1 row)
step s1-shard-move-c1-block-writes:
SELECT citus_move_shard_placement(1500001, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
<waiting ...>
step s4-shard-move-sep-block-writes:
SELECT citus_move_shard_placement(1500009, 'localhost', 57637, 'localhost', 57638, shard_transfer_mode:='block_writes');
<waiting ...>
step s7-get-progress-ordered:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available
FROM get_rebalance_progress()
ORDER BY 1, 2, 3, 4, 5;
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available
---------------------------------------------------------------------
colocated1|1500001| 40000|localhost | 57637| 40000|localhost | 57638| 40000| 1|move |t |t |f
colocated2|1500005| 480000|localhost | 57637| 480000|localhost | 57638| 480000| 1|move |t |t |f
separate |1500009| 200000|localhost | 57637| 200000|localhost | 57638| 200000| 1|move |t |t |f
(3 rows)
step s6-release-advisory-lock:
SELECT pg_advisory_unlock(44000, 55152);
pg_advisory_unlock
---------------------------------------------------------------------
t
(1 row)
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-wait:
step s4-wait:
step s7-get-progress-ordered:
set LOCAL client_min_messages=NOTICE;
WITH possible_sizes(size) as (VALUES (0), (8000), (40000), (200000), (480000))
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,
target_lsn IS NULL OR source_lsn >= target_lsn AS lsn_sanity_check,
source_lsn IS NOT NULL AS source_lsn_available,
target_lsn IS NOT NULL AS target_lsn_available
FROM get_rebalance_progress()
ORDER BY 1, 2, 3, 4, 5;
table_name|shardid|shard_size|sourcename|sourceport|source_shard_size|targetname|targetport|target_shard_size|progress|operation_type|lsn_sanity_check|source_lsn_available|target_lsn_available
---------------------------------------------------------------------
(0 rows)