mirror of https://github.com/citusdata/citus.git
enable local execution for TRUNCATE command on distributed & reference tables
parent
38a59b4767
commit
c162755cc5
|
@ -73,7 +73,15 @@ citus_truncate_trigger(PG_FUNCTION_ARGS)
|
|||
{
|
||||
List *taskList = TruncateTaskList(relationId);
|
||||
|
||||
ExecuteUtilityTaskListWithoutResults(taskList);
|
||||
/*
|
||||
* If it is a local placement of a distributed table or a reference table,
|
||||
* then execute TRUNCATE command locally.
|
||||
*/
|
||||
bool localExecutionSupported = true;
|
||||
|
||||
UseCoordinatedTransaction();
|
||||
|
||||
ExecuteUtilityTaskListWithoutResults(taskList, localExecutionSupported);
|
||||
}
|
||||
|
||||
PG_RETURN_DATUM(PointerGetDatum(NULL));
|
||||
|
|
Loading…
Reference in New Issue