Re: Partial aggregates pushdown
От | Alexander Pyhalov |
---|---|
Тема | Re: Partial aggregates pushdown |
Дата | |
Msg-id | a22d250b61a3faa425864573364db66d@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: Partial aggregates pushdown (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Partial aggregates pushdown
|
Список | pgsql-hackers |
Bruce Momjian писал(а) 2024-06-04 20:12: > On Mon, May 27, 2024 at 09:30:59PM +0000, > Fujii.Yuki@df.MitsubishiElectric.co.jp wrote: >> Hi Mr. Pyhalov. >> >> Sorry for the late reply. >> Thank you for your modification and detailed review. >> I attach a fixed patch, have been not yet rebased. > > I know this patch was discussed at the Vancouver conference. What are > the open issues? I know of several: > > * add tests that were requested by Fujii-san and now posted by > Alexander Pyhalov > * Where is the documentation? I know the original patch had some, and > I improved it, but it seems to be missing. > * Passes unsafe binary data from the foreign server. > > Can someone show me where that last item is in the patch, and why can't > we just pass back values cast to text? Hi. In finalize_aggregate() when we see partial aggregate with peragg->aggref->aggtranstype = INTERNALOID we call aggregate's serialization function and return it as bytea. The issue is that this internal representation isn't guaranteed to be compatible between servers of different versions (or architectures?). So, likely, we instead should have called some export function for aggregate and later - some import function on postgres_fdw side. It doesn't matter much, what this export function generates - text, json or some portable binary format, 1) export/import functions should just "understand" it, 2) it should be a stable representation. -- Best regards, Alexander Pyhalov, Postgres Professional
В списке pgsql-hackers по дате отправления: