| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org | 
| Subject: | pgsql: Finish refactoring make_foo() functions in createplan.c. | 
| Date: | 2016-03-08 21:28:45 | 
| Message-ID: | [email protected] | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers | 
Finish refactoring make_foo() functions in createplan.c.
This patch removes some redundant cost calculations that I left for later
cleanup in commit 3fc6e2d7f5b652b4.  There's now a uniform policy that the
make_foo() convenience functions don't do any cost calculations.  Most of
their callers copy costs from the source Path node, and for those that
don't, the calculation in the make_foo() function wasn't necessarily right
anyhow.  (make_result() was particularly a mess, as it was serving multiple
callers using cost calcs designed for only the first one or two that had
ever existed.)  Aside from saving a few cycles, this ensures that what
EXPLAIN prints matches the costs we used for planning purposes.  It does
not change any planner decisions, since the decisions are already made.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8c314b9853c2fbb85c041d4761426f25a9d63972
Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 416 ++++++++++++++------------------
src/backend/optimizer/plan/planmain.c   |   2 +-
src/backend/optimizer/plan/planner.c    |   4 +-
src/backend/optimizer/util/pathnode.c   |  24 +-
src/include/optimizer/pathnode.h        |   4 +-
5 files changed, 201 insertions(+), 249 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2016-03-08 21:49:33 | pgsql: plperl: Correctly handle empty arrays in plperl_ref_from_pg_arra | 
| Previous Message | Robert Haas | 2016-03-08 19:45:24 | pgsql: Comment update for fdw_recheck_quals. |