pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Fix cost estimation for aggregate pushdown.
Date: Thu, 09 May 2019 09:42:22 +0000
Message-ID: <E1hOfZG-0004td-54@gemulon.postgresql.org> (raw)

postgres_fdw: Fix cost estimation for aggregate pushdown.

In commit 7012b132d0, which added support for aggregate pushdown in
postgres_fdw, the expense of evaluating the final scan/join target
computed by make_group_input_target() was not accounted for at all in
costing aggregate pushdown paths with local statistics.  The right fix
for this would be to have a separate upper stage to adjust the final
scan/join relation (see comments for apply_scanjoin_target_to_paths());
but for now, fix by adding the tlist eval cost when costing aggregate
pushdown paths with local statistics.

Apply this to HEAD only to avoid destabilizing existing plan choices.

Author: Etsuro Fujita
Reviewed-By: Antonin Houska
Discussion: https://postgr.es/m/5C66A056.60007%40lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/edbcbe277d795ecc339b0e4fa29bae42ce1a7be9

Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c  | 16 +++++++++++++---
src/backend/optimizer/plan/planner.c |  4 ++++
2 files changed, 17 insertions(+), 3 deletions(-)



Message-ID: <E1hOfZG-0004td-54@gemulon.postgresql.org>
Permalink:  ../E1hOfZG-0004td-54@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hOfZG-0004td-54@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: efujita@postgresql.org
  Subject: Re: pgsql: postgres_fdw: Fix cost estimation for aggregate pushdown.
  In-Reply-To: <E1hOfZG-0004td-54@gemulon.postgresql.org>
  References: <E1hOfZG-0004td-54@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