pgsql: Postpone generate_gather_paths for topmost scan/join rel.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Postpone generate_gather_paths for topmost scan/join rel.
Date: 2018-03-29 19:46:18
Message-ID: E1f1dV4-0006hc-SQ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Postpone generate_gather_paths for topmost scan/join rel.

Don't call generate_gather_paths for the topmost scan/join relation
when it is initially populated with paths. Instead, do the work in
grouping_planner. By itself, this gains nothing; in fact it loses
slightly because we end up calling set_cheapest() for the topmost
scan/join rel twice rather than once. However, it paves the way for
a future commit which will postpone generate_gather_paths for the
topmost scan/join relation even further, allowing more accurate
costing of parallel paths.

Amit Kapila and Robert Haas. Earlier versions of this patch (which
different substantially) were reviewed by Dilip Kumar, Amit
Khandekar, Marina Polyakova, and Ashutosh Bapat.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3f90ec8597c3515e0d3190613b31491686027e4b

Modified Files
--------------
src/backend/optimizer/geqo/geqo_eval.c | 21 ++++++++++++++-------
src/backend/optimizer/path/allpaths.c | 26 +++++++++++++++++++-------
src/backend/optimizer/plan/planner.c | 9 +++++++++
3 files changed, 42 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2018-03-29 19:52:40 pgsql: Rewrite the code that applies scan/join targets to paths.
Previous Message Robert Haas 2018-03-29 19:39:48 pgsql: Teach create_projection_plan to omit projection where possible.