pgsql: Postpone generate_gather_paths for topmost scan/join rel. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Postpone generate_gather_paths for topmost scan/join rel.
Date
Msg-id E1f1dV4-0006hc-SQ@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Teach create_projection_plan to omit projection where possible.
Next
From: Robert Haas
Date:
Subject: pgsql: Rewrite the code that applies scan/join targets to paths.