RE: Partial aggregates pushdown
От | Fujii.Yuki@df.MitsubishiElectric.co.jp" |
---|---|
Тема | RE: Partial aggregates pushdown |
Дата | |
Msg-id | OS3PR01MB66603EFA3A42AB5EE74438E295149@OS3PR01MB6660.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: Partial aggregates pushdown (Alexander Pyhalov <a.pyhalov@postgrespro.ru>) |
Ответы |
Re: Partial aggregates pushdown
|
Список | pgsql-hackers |
Hi Mr.Pyhalov. > One more issue I started to think about - now we don't check > partialagg_minversion for "simple" aggregates at all. Is it correct? It seems that , > for example, we could try to pushdown bit_or(int8) to old servers, but it didn't > exist, for example, in 8.4. I think it's a broader issue (it would be also the case > already if we push down > aggregates) and shouldn't be fixed here. But there is an issue - > is_shippable() is too optimistic. I think it is correct for now. F.38.7 of [1] says "A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table." and says that we can avoid this limitation by rewriting query. It looks that postgres_fdw follows this policy in case of UPPERREL_GROUP_AGG aggregate pushdown. If a aggreagate has not internal aggtranstype and has not aggfinalfn , partialaggfn of it is equal to itself. So I think that it is adequate to follow this policy in case of partial aggregate pushdown for such aggregates. > >> 2) Do we really have to look at pg_proc in partial_agg_ok() and > >> deparseAggref()? Perhaps, looking at aggtranstype is enough? > > You are right. I fixed according to your comment. > > > > partial_agg_ok() still looks at pg_proc. Sorry for taking up your time. I fixed it. [1] https://www.postgresql.org/docs/current/postgres-fdw.html Sincerely yours, Yuuki Fujii -- Yuuki Fujii Information Technology R&D Center Mitsubishi Electric Corporation
Вложения
В списке pgsql-hackers по дате отправления: