mirror of https://github.com/citusdata/citus.git
Before this commit, Citus supported INSERT...SELECT queries with ON CONFLICT or RETURNING clauses only for pushdownable ones, since queries supported via coordinator were utilizing COPY infrastructure of PG to send selected tuples to the target worker nodes. After this PR, INSERT...SELECT queries with ON CONFLICT or RETURNING clauses will be performed in two phases via coordinator. In the first phase selected tuples will be saved to the intermediate table which is colocated with target table of the INSERT...SELECT query. Note that, a utility function to save results to the colocated intermediate result also implemented as a part of this commit. In the second phase, INSERT.. SELECT query is directly run on the worker node using the intermediate table as the source table. |
||
---|---|---|
.. | ||
citus_custom_scan.c | ||
insert_select_executor.c | ||
intermediate_results.c | ||
multi_client_executor.c | ||
multi_executor.c | ||
multi_real_time_executor.c | ||
multi_router_executor.c | ||
multi_server_executor.c | ||
multi_task_tracker_executor.c | ||
query_stats.c | ||
subplan_execution.c |