pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move per-agg and per-trans duplicate finding to the planner.
Date: Tue, 24 Nov 2020 08:53:42 +0000
Message-ID: <E1khU50-0001Af-Ir@gemulon.postgresql.org> (raw)

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(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1khU50-0001Af-Ir@gemulon.postgresql.org>
Permalink:  ../E1khU50-0001Af-Ir@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1khU50-0001Af-Ir@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Move per-agg and per-trans duplicate finding to the planner.
  In-Reply-To: <E1khU50-0001Af-Ir@gemulon.postgresql.org>
  References: <E1khU50-0001Af-Ir@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox