RE: Partial aggregates pushdown

Поиск
Список
Период
Сортировка
От Fujii.Yuki@df.MitsubishiElectric.co.jp"
Тема RE: Partial aggregates pushdown
Дата
Msg-id TYTPR01MB10954D890D8F729E1BCE42D4F95DDA@TYTPR01MB10954.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Partial aggregates pushdown  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Partial aggregates pushdown  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi Mr.Momjian

> From: Bruce Momjian <bruce@momjian.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
localserver. 
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: trying again to get incremental backup
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Add trailing commas to enum definitions