From: | "Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp" <Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "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>, Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, "Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp" <Fujii(dot)Yuki(at)df(dot)MitsubishiElectric(dot)co(dot)jp> |
Subject: | RE: Partial aggregates pushdown |
Date: | 2023-10-26 11:11:09 |
Message-ID: | TYTPR01MB10954D890D8F729E1BCE42D4F95DDA@TYTPR01MB10954.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Mr.Momjian
> From: Bruce Momjian <bruce(at)momjian(dot)us>
> Sent: Thursday, October 26, 2023 7:08 AM
> I am almost done updating the patch, but I got stuck on how the feature is supposed to work. This documentation
> sentence is where I got
> confused:
>
> <varlistentry>
> <term><literal>check_partial_aggregate_support</literal> (<type>boolean</type>)</term>
> <listitem>
> <para>
> If this option is false, <filename>postgres_fdw</filename> assumes
> that for each built-in aggregate function,
> the partial aggregate function is defined on the remote server
> without checking the remote server version.
> If this option is true, during query planning,
> <filename>postgres_fdw</filename> connects to the remote server
> and checks if the remote server version is older than the local server version.
> If so,
> <filename>postgres_fdw</filename>
> --> assumes that for each built-in aggregate function, the partial aggregate function is not defined
> --> on the remote server unless the partial aggregate function and the aggregate
> --> function match.
> Otherwise <filename>postgres_fdw</filename> assumes that for each built-in aggregate function,
> the partial aggregate function is defined on the remote server.
> The default is <literal>false</literal>.
> </para>
> </listitem>
> </varlistentry>
>
> What does that marked sentence mean? What is match? Are one or both of these remote? It sounds like you are
> checking the local aggregate against the remote partial aggregate, but I don't see any code that does this in the patch.
This sentence means that
"If the partial aggregate function has the same OID as the aggregate function,
then postgres_fdw assumes that for each built-in aggregate function, the partial aggregate function is not defined
on the remote server."
"Match" means that the partial aggregate function has the same OID as the aggregate function in local server.
But, in v30, there is no code which checks the partial aggregate function has the same OID as the aggregate function in local server.
So I modified the code of is_builtin_aggpartialfunc_shippable().
Also, I modified wording postgres-fdw.sgml.
Sincerely yours,
Yuuki Fujii
--
Yuuki Fujii
Information Technology R&D Center Mitsubishi Electric Corporation
Attachment | Content-Type | Size |
---|---|---|
0001-Partial-aggregates-push-down-v31.patch | application/octet-stream | 267.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-10-26 11:20:34 | Re: Add trailing commas to enum definitions |
Previous Message | Andrew Dunstan | 2023-10-26 10:59:00 | Re: trying again to get incremental backup |