From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Move per-agg and per-trans duplicate finding to the planner. |
Date: | 2020-11-24 08:53:42 |
Message-ID: | E1khU50-0001Af-Ir@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Move per-agg and per-trans duplicate finding to the planner.
This has the advantage that the cost estimates for aggregates can count
the number of calls to transition and final functions correctly.
Bump catalog version, because views can contain Aggrefs.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/b2e3536b-1dbc-8303-c97e-89cb0b4a9a48%40iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0a2bc5d61e713e3fe72438f020eea5fcc90b0f0b
Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 12 +-
src/backend/executor/execExpr.c | 10 +-
src/backend/executor/execExprInterp.c | 6 +-
src/backend/executor/nodeAgg.c | 364 +++---------
src/backend/jit/llvm/llvmjit_expr.c | 11 +-
src/backend/nodes/copyfuncs.c | 2 +
src/backend/nodes/equalfuncs.c | 2 +
src/backend/nodes/outfuncs.c | 2 +
src/backend/nodes/readfuncs.c | 2 +
src/backend/optimizer/path/costsize.c | 3 +-
src/backend/optimizer/plan/planagg.c | 69 +--
src/backend/optimizer/plan/planner.c | 66 +--
src/backend/optimizer/prep/Makefile | 1 +
src/backend/optimizer/prep/prepagg.c | 678 ++++++++++++++++++++++
src/backend/optimizer/util/clauses.c | 288 ---------
src/backend/parser/parse_func.c | 2 +
src/backend/utils/adt/selfuncs.c | 12 +-
src/include/catalog/catversion.h | 2 +-
src/include/executor/execExpr.h | 3 +-
src/include/nodes/execnodes.h | 11 -
src/include/nodes/nodes.h | 3 +-
src/include/nodes/pathnodes.h | 80 ++-
src/include/nodes/primnodes.h | 8 +
src/include/optimizer/clauses.h | 2 -
src/include/optimizer/prep.h | 8 +
src/include/utils/selfuncs.h | 2 +-
src/test/regress/expected/partition_aggregate.out | 41 +-
src/test/regress/sql/partition_aggregate.sql | 9 +-
src/tools/pgindent/typedefs.list | 1 -
29 files changed, 954 insertions(+), 746 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-11-24 10:58:53 | Re: pgsql: Move per-agg and per-trans duplicate finding to the planner. |
Previous Message | Fujii Masao | 2020-11-24 08:01:02 | pgsql: doc: Get rid of unnecessary space character from some index item |