mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Support Parallel Append plan nodes.
When we create an Append node, we can spread out the workers over the subplans instead of piling on to each subplan one at a time, which should typically be a bit more efficient, both because the startup cost of any plan executed entirely by one worker is paid only once and also because of reduced contention. We can also construct Append plans using a mix of partial and non-partial subplans, which may allow for parallelism in places that otherwise couldn't support it. Unfortunately, this patch doesn't handle the important case of parallelizing UNION ALL by running each branch in a separate worker; the executor infrastructure is added here, but more planner work is needed. Amit Khandekar, Robert Haas, Amul Sul, reviewed and tested by Ashutosh Bapat, Amit Langote, Rafia Sabih, Amit Kapila, and Rajkumar Raghuwanshi. Discussion: http://postgr.es/m/CAJ3gD9dy0K_E8r727heqXoBmWZ83HwLFwdcaSSmBQ1+S+vRuUQ@mail.gmail.com
This commit is contained in:
@@ -68,6 +68,7 @@ extern bool enable_mergejoin;
|
||||
extern bool enable_hashjoin;
|
||||
extern bool enable_gathermerge;
|
||||
extern bool enable_partition_wise_join;
|
||||
extern bool enable_parallel_append;
|
||||
extern int constraint_exclusion;
|
||||
|
||||
extern double clamp_row_est(double nrows);
|
||||
@@ -106,6 +107,7 @@ extern void cost_sort(Path *path, PlannerInfo *root,
|
||||
List *pathkeys, Cost input_cost, double tuples, int width,
|
||||
Cost comparison_cost, int sort_mem,
|
||||
double limit_tuples);
|
||||
extern void cost_append(AppendPath *path);
|
||||
extern void cost_merge_append(Path *path, PlannerInfo *root,
|
||||
List *pathkeys, int n_streams,
|
||||
Cost input_startup_cost, Cost input_total_cost,
|
||||
|
||||
Reference in New Issue
Block a user