Distribute deprecated dist tables

ref_on_buraks
Burak Velioglu 2022-01-26 00:36:41 +03:00
parent 233230968f
commit c1149cf4fa
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
2 changed files with 20 additions and 24 deletions

View File

@ -970,31 +970,22 @@ SELECT update_distributed_table_colocation('table1_group_none', colocate_with =>
(1 row) (1 row)
-- sync metadata to get rid of inconsistencies in pg_dist tables -- activate nodes to get rid of inconsistencies in pg_dist tables
select stop_metadata_sync_to_node('localhost', :worker_1_port); INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table1_group1'::regclass::oid, 0);
NOTICE: dropping metadata on the node (localhost,57637) INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table2_group1'::regclass::oid, 0);
stop_metadata_sync_to_node INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table3_group2'::regclass::oid, 0);
INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table4_group2'::regclass::oid, 0);
INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table5_groupX'::regclass::oid, 0);
select 1 from citus_activate_node('localhost', :worker_1_port);
?column?
--------------------------------------------------------------------- ---------------------------------------------------------------------
1
(1 row) (1 row)
select stop_metadata_sync_to_node('localhost', :worker_2_port); select 1 from citus_activate_node('localhost', :worker_2_port);
NOTICE: dropping metadata on the node (localhost,57638) ?column?
stop_metadata_sync_to_node
--------------------------------------------------------------------- ---------------------------------------------------------------------
1
(1 row)
select start_metadata_sync_to_node('localhost', :worker_1_port);
start_metadata_sync_to_node
---------------------------------------------------------------------
(1 row)
select start_metadata_sync_to_node('localhost', :worker_2_port);
start_metadata_sync_to_node
---------------------------------------------------------------------
(1 row) (1 row)
-- move a table with a colocation id which is already not in pg_dist_colocation -- move a table with a colocation id which is already not in pg_dist_colocation

View File

@ -410,9 +410,14 @@ SELECT update_distributed_table_colocation('table1_group_none', colocate_with =>
SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table2_groupE'); SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table2_groupE');
SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table3_groupE'); SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table3_groupE');
-- activate node to get rid of inconsistencies in pg_dist tables -- activate nodes to get rid of inconsistencies in pg_dist tables
select citus_activate_node('localhost', :worker_1_port); INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table1_group1'::regclass::oid, 0);
select citus_activate_node('localhost', :worker_2_port); INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table2_group1'::regclass::oid, 0);
INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table3_group2'::regclass::oid, 0);
INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table4_group2'::regclass::oid, 0);
INSERT INTO citus.pg_dist_object(classid, objid, objsubid) values('pg_class'::regclass::oid, 'table5_groupX'::regclass::oid, 0);
select 1 from citus_activate_node('localhost', :worker_1_port);
select 1 from citus_activate_node('localhost', :worker_2_port);
-- move a table with a colocation id which is already not in pg_dist_colocation -- move a table with a colocation id which is already not in pg_dist_colocation
SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table2_group_none'); SELECT update_distributed_table_colocation('table1_group_none', colocate_with => 'table2_group_none');