select rebalance_table_shards('github_events');
CONTEXT: SQL statement "SELECT update_shard_placement(placement_update_data, relation,
responsive_node_list)"
PL/pgSQL function replicate_table_shards(regclass,integer,integer,bigint[]) line 60 at PERFORM
NOTICE: Copying shard 103380 from worker1.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 to worker3.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 ...
WARNING: could not receive query results from worker3.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432
DETAIL: Client error: function worker_fetch_regular_table(unknown, integer, unknown, unknown) does not exist
CONTEXT: SQL statement "SELECT update_shard_placement(placement_update_data, relation,
responsive_node_list)"
PL/pgSQL function replicate_table_shards(regclass,integer,integer,bigint[]) line 60 at PERFORM
WARNING: could not copy 103380 from worker1.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 to worker3.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432
CONTEXT: SQL statement "SELECT update_shard_placement(placement_update_data, relation,
responsive_node_list)"
PL/pgSQL function replicate_table_shards(regclass,integer,integer,bigint[]) line 60 at PERFORM
NOTICE: Copying shard 103381 from worker2.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 to worker4.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 ...
WARNING: could not receive query results from worker4.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432
DETAIL: Client error: function worker_fetch_regular_table(unknown, integer, unknown, unknown) does not exist
CONTEXT: SQL statement "SELECT update_shard_placement(placement_update_data, relation,
responsive_node_list)"
PL/pgSQL function replicate_table_shards(regclass,integer,integer,bigint[]) line 60 at PERFORM
WARNING: could not copy 103381 from worker2.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432 to worker4.t56ye4r5t6y7.us-east-1.rds.amazonaws.com:5432
List of schemas
Name | Owner
---------------------------+----------
pgs_distribution_metadata | postgres
public | postgres
(2 rows)
When i check the table structure in new worker nodes, it looks like this.
List of schemas
Name | Owner
---------------------------+----------
public | postgres
(2 rows)
Do we need to perform any other step to work the rebalance on shard. I set up the cluster using these instructions in citusdata installation.
Appreciate you help on this.
Thanks
Shankar.
SELECT master_create_worker_shards('github_events', 16, 2);
Then i populated table with some data. After some days i want to increase the replication factor to 3.
Can we achieve this using the UDF replicate_table_shards as given in the page
https://www.citusdata.com/documentation/citusdb-documentation/reference/user_defined_functions.html#replicate_table_shards ?
Do we need shard rebalance extension to be installed on master and worker nodes to use replicate_table_shards UDF ?
Thanks
Shankar
SELECT replicate_table_shards('dist_table', shard_replication_factor:=3);
rebalance_table_shards
------------------------
(1 row)
But i dont see the shards are rebalancing. Please help me on this.
Thanks
Shankar