Re: Partial aggregates pushdown

From: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
To: "Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp" <Fujii(dot)Yuki(at)df(dot)mitsubishielectric(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: Partial aggregates pushdown
Date: 2023-09-28 06:15:43
Message-ID: d6da71cbe09676cda43ad39e5cb791a2@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp писал 2023-09-28 07:40:

>> I'm not sure that I like this mechanics of adding sort group clauses -
>> it seems we do in core additional work, which is of use only for
>> one extension, but at least it seems to be working.
> We cannot deparse the original sort group clauses and pathtarget
> when performing partial aggreggate pushdown by any FDWs.
> So I think the additional sort group clauses and pathtarget are
> needed by any FDWs, not only postgres_fdw.
>

Hi.
It seems to me that *fdw postfixes don't clarify things, but just make
naming more ugly.

+ * Adding these Vars and PlaceHolderVars to PathTarget,
+ * FDW cannot deparse this by the original List of SortGroupClauses.
+ * So, before this adding process,
+ * setGroupClausePartial generates another Pathtarget and another
+ * List of SortGroupClauses for FDW.

It seems that something like:

/*
* Modified PathTarget cannot be used by FDW as-is to deparse this
statement.
* So, before modifying PathTarget, setGroupClausePartial generates
* another Pathtarget and another list List of SortGroupClauses
* to make deparsing possible.
*/

sounds better.

--
Best regards,
Alexander Pyhalov,
Postgres Professional

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-09-28 06:42:43 Re: Jumble the CALL command in pg_stat_statements
Previous Message Karl O. Pinc 2023-09-28 05:58:28 Re: [PGdocs] fix description for handling pf non-ASCII characters