pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: postgres_fdw: Push down partition-wise aggregation.
4+ messages / 4 participants
[nested] [flat]
* pgsql: postgres_fdw: Push down partition-wise aggregation.
@ 2018-04-02 14:57 Robert Haas <rhaas@postgresql.org>
2018-04-02 17:49 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Haas @ 2018-04-02 14:57 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
postgres_fdw: Push down partition-wise aggregation.
Since commit 7012b132d07c2b4ea15b0b3cb1ea9f3278801d98, postgres_fdw
has been able to push down the toplevel aggregation operation to the
remote server. Commit e2f1eb0ee30d144628ab523432320f174a2c8966 made
it possible to break down the toplevel aggregation into one
aggregate per partition. This commit lets postgres_fdw push down
aggregation in that case just as it does at the top level.
In order to make this work, this commit adds an additional argument
to the GetForeignUpperPaths FDW API. A matching argument is added
to the signature for create_upper_paths_hook. Third-party code using
either of these will need to be updated.
Also adjust create_foreignscan_plan() so that it picks up the correct
set of relids in this case.
Jeevan Chalke, reviewed by Ashutosh Bapat and by me and with some
adjustments by me. 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, and Rafia Sabih.
Discussion: http://postgr.es/m/CAM2+6=V64_xhstVHie0Rz=KPEQnLJMZt_e314P0jaT_oJ9MR8A@mail.gmail.com
Discussion: http://postgr.es/m/CAM2+6=XPWujjmj5zUaBTGDoB38CemwcPmjkRy0qOcsQj_V+2sQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7e0d64c7a57e28fbcf093b6da9310a38367c1d75
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 132 +++++++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.c | 53 +++++++---
contrib/postgres_fdw/sql/postgres_fdw.sql | 51 ++++++++++
doc/src/sgml/fdwhandler.sgml | 9 +-
src/backend/optimizer/plan/createplan.c | 2 +-
src/backend/optimizer/plan/planner.c | 29 +++---
src/backend/optimizer/prep/prepunion.c | 2 +-
src/include/foreign/fdwapi.h | 3 +-
src/include/optimizer/planner.h | 3 +-
9 files changed, 251 insertions(+), 33 deletions(-)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: postgres_fdw: Push down partition-wise aggregation.
2018-04-02 14:57 pgsql: postgres_fdw: Push down partition-wise aggregation. Robert Haas <rhaas@postgresql.org>
@ 2018-04-02 17:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-04-02 17:57 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2018-04-02 17:49 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
Robert Haas <rhaas@postgresql.org> writes:
> postgres_fdw: Push down partition-wise aggregation.
Seems to have broken the docs build.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: postgres_fdw: Push down partition-wise aggregation.
2018-04-02 14:57 pgsql: postgres_fdw: Push down partition-wise aggregation. Robert Haas <rhaas@postgresql.org>
2018-04-02 17:49 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-04-02 17:57 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-04-02 19:26 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Peter Eisentraut @ 2018-04-02 17:57 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
On 4/2/18 13:49, Tom Lane wrote:
> Robert Haas <rhaas@postgresql.org> writes:
>> postgres_fdw: Push down partition-wise aggregation.
>
> Seems to have broken the docs build.
fixed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: postgres_fdw: Push down partition-wise aggregation.
2018-04-02 14:57 pgsql: postgres_fdw: Push down partition-wise aggregation. Robert Haas <rhaas@postgresql.org>
2018-04-02 17:49 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-02 17:57 ` Re: pgsql: postgres_fdw: Push down partition-wise aggregation. Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-04-02 19:26 ` Robert Haas <robertmhaas@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Robert Haas @ 2018-04-02 19:26 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org
On Mon, Apr 2, 2018 at 1:57 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 4/2/18 13:49, Tom Lane wrote:
>> Robert Haas <rhaas@postgresql.org> writes:
>>> postgres_fdw: Push down partition-wise aggregation.
>>
>> Seems to have broken the docs build.
>
> fixed
Thanks.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-04-02 19:26 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-02 14:57 pgsql: postgres_fdw: Push down partition-wise aggregation. Robert Haas <rhaas@postgresql.org>
2018-04-02 17:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-04-02 17:57 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-04-02 19:26 ` Robert Haas <robertmhaas@gmail.com>
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