Add delete metadata commands back

velioglu/wo_seq_test_1
Burak Velioglu 2022-01-20 17:32:55 +03:00
parent da3a0f4cdd
commit 9c470ed6d4
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
2 changed files with 11 additions and 3 deletions

View File

@ -743,11 +743,10 @@ SyncTableMetadataCommandList(WorkerNode *workerNode)
List *commandList = NIL; List *commandList = NIL;
/* /*
* Remove shell tables and pg_dist_* metadata. * Remove shell tables first.
*/ */
commandList = list_concat(commandList, DetachPartitionCommandList()); commandList = list_concat(commandList, DetachPartitionCommandList());
commandList = lappend(commandList, REMOVE_ALL_CITUS_TABLES_COMMAND); commandList = lappend(commandList, REMOVE_ALL_CLUSTERED_TABLES_ONLY_COMMAND);
commandList = lappend(commandList, DELETE_ALL_DISTRIBUTED_OBJECTS);
/* /*
* Propagate node wide objects. It includes only roles for now. * Propagate node wide objects. It includes only roles for now.
@ -767,6 +766,11 @@ SyncTableMetadataCommandList(WorkerNode *workerNode)
*/ */
commandList = list_concat(commandList, InterTableRelationshipCommandList()); commandList = list_concat(commandList, InterTableRelationshipCommandList());
commandList = lappend(commandList, DELETE_ALL_DISTRIBUTED_OBJECTS);
commandList = lappend(commandList, DELETE_ALL_PLACEMENTS);
commandList = lappend(commandList, DELETE_ALL_SHARDS);
commandList = lappend(commandList, DELETE_ALL_PARTITIONS);
/* /*
* Finally create pg_dist_* entries * Finally create pg_dist_* entries
*/ */

View File

@ -35,7 +35,11 @@ FOR EACH ROW EXECUTE FUNCTION dummy_function();
-- Show that we can activate node successfully. That means, we create -- Show that we can activate node successfully. That means, we create
-- the function that trigger needs in mx workers too. -- the function that trigger needs in mx workers too.
set citus.log_remote_commands to true;
set citus.worker_min_messages to debug4;
SELECT citus_activate_node('localhost', :worker_1_port); SELECT citus_activate_node('localhost', :worker_1_port);
reset citus.log_remote_commands;
reset citus.worker_min_messages;
CREATE EXTENSION seg; CREATE EXTENSION seg;
ALTER TRIGGER dummy_function_trigger ON citus_local_table DEPENDS ON EXTENSION seg; ALTER TRIGGER dummy_function_trigger ON citus_local_table DEPENDS ON EXTENSION seg;