pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add a new upper planner relation for partially-aggregated result
Date: Mon, 26 Feb 2018 14:33:07 +0000
Message-ID: <E1eqJpz-0004jq-JD@gemulon.postgresql.org> (raw)

Add a new upper planner relation for partially-aggregated results.

Up until now, we've abused grouped_rel->partial_pathlist as a place to
store partial paths that have been partially aggregate, but that's
really not correct, because a partial path for a relation is supposed
to be one which produces the correct results with the addition of only
a Gather or Gather Merge node, and these paths also require a Finalize
Aggregate step.  Instead, add a new partially_group_rel which can hold
either partial paths (which need to be gathered and then have
aggregation finalized) or non-partial paths (which only need to have
aggregation finalized).  This allows us to reuse generate_gather_paths
for partially_grouped_rel instead of writing new code, so that this
patch actually basically no net new code while making things cleaner,
simplifying things for pending patches for partition-wise aggregate.

Robert Haas and Jeevan Chalke.  The larger patch series of which this
patch is a part was also reviewed and tested by Antonin Houska,
Rajkumar Raghuwanshi, David Rowley, Dilip Kumar, Konstantin Knizhnik,
Pascal Legrand, Rafia Sabih, and me.

Discussion: http://postgr.es/m/CA+TgmobrzFYS3+U8a_BCy3-hOvh5UyJbC18rEcYehxhpw5=ETA@mail.gmail.com
Discussion: http://postgr.es/m/CA+TgmoZyQEjdBNuoG9-wC5GQ5GrO4544Myo13dVptvx+uLg9uQ@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/README           |   1 +
src/backend/optimizer/geqo/geqo_eval.c |   2 +-
src/backend/optimizer/path/allpaths.c  |  26 +++-
src/backend/optimizer/plan/planner.c   | 273 +++++++++++++++------------------
src/include/nodes/relation.h           |   2 +
src/include/optimizer/paths.h          |   3 +-
6 files changed, 154 insertions(+), 153 deletions(-)



Message-ID: <E1eqJpz-0004jq-JD@gemulon.postgresql.org>
Permalink:  ../E1eqJpz-0004jq-JD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eqJpz-0004jq-JD@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: rhaas@postgresql.org
  Subject: Re: pgsql: Add a new upper planner relation for partially-aggregated result
  In-Reply-To: <E1eqJpz-0004jq-JD@gemulon.postgresql.org>
  References: <E1eqJpz-0004jq-JD@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