Remove placements wisely

velioglu/wo_seq_test_1
Burak Velioglu 2021-12-31 17:50:35 +03:00
parent 596e49db8c
commit 070e2afbe5
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
3 changed files with 9 additions and 6 deletions

View File

@ -1200,9 +1200,12 @@ ActivateNode(char *nodeName, int nodePort)
* Delete replicated table placements from the coordinator's metadata,
* including remote ones.
*/
if (syncMetadata && !NodeIsCoordinator(workerNode) && NodeIsPrimary(workerNode))
{
bool forceRemoteDelete = true;
DeleteAllReplicatedTablePlacementsFromNodeGroup(workerNode->groupId,
forceRemoteDelete);
}
SetUpDistributedTableWithDependencies(workerNode);

View File

@ -191,7 +191,7 @@ test: multi_repartition_udt multi_repartitioned_subquery_udf multi_subtransactio
test: multi_modifying_xacts
test: check_mx
test: turn_mx_off
test: multi_generate_ddl_commands multi_repair_shards
# test: multi_generate_ddl_commands multi_repair_shards
test: multi_create_shards
test: multi_transaction_recovery
test: turn_mx_on

View File

@ -107,7 +107,7 @@ DROP TABLE local_table;
-- Verify that all indexes got created on the master node and one of the workers
SELECT * FROM pg_indexes WHERE tablename = 'lineitem' or tablename like 'index_test_%' ORDER BY indexname;
\c - - - :worker_1_port
SELECT count(*) FROM pg_indexes WHERE tablename = (SELECT relname FROM pg_class WHERE relname LIKE 'lineitem_%' ORDER BY relname LIMIT 1);
SELECT * FROM pg_indexes WHERE tablename LIKE 'lineitem_%';
SELECT count(*) FROM pg_indexes WHERE tablename LIKE 'index_test_hash_%';
SELECT count(*) FROM pg_indexes WHERE tablename LIKE 'index_test_range_%';
SELECT count(*) FROM pg_indexes WHERE tablename LIKE 'index_test_append_%';
@ -189,7 +189,7 @@ SELECT indrelid::regclass, indexrelid::regclass FROM pg_index WHERE indrelid = (
SELECT * FROM pg_indexes WHERE tablename LIKE 'index_test_%' ORDER BY indexname;
\c - - - :worker_1_port
SET citus.override_table_visibility TO FALSE;
SELECT indrelid::regclass, indexrelid::regclass FROM pg_index WHERE indrelid = (SELECT relname FROM pg_class WHERE relname SIMILAR TO 'lineitem%\d' ORDER BY relname LIMIT 1)::regclass AND NOT indisprimary AND indexrelid::regclass::text NOT LIKE 'lineitem_time_index%' ORDER BY 1,2;
SELECT indrelid::regclass, indexrelid::regclass FROM pg_index WHERE indrelid = (SELECT relname FROM pg_class WHERE relname SIMILAR TO 'lineitem_360000' ORDER BY relname LIMIT 1)::regclass AND NOT indisprimary AND indexrelid::regclass::text NOT LIKE 'lineitem_time_index%' ORDER BY 1,2;
SELECT * FROM pg_indexes WHERE tablename SIMILAR TO 'index_test_%\d' ORDER BY indexname;
-- create index that will conflict with master operations