Re: PATCH: decreasing memory needlessly consumed by array_agg

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: PATCH: decreasing memory needlessly consumed by array_agg
Дата
Msg-id 54978590.5000709@BlueTreble.com
обсуждение исходный текст
Ответ на Re: PATCH: decreasing memory needlessly consumed by array_agg  (Ali Akbar <the.apaan@gmail.com>)
Список pgsql-hackers
On 12/21/14, 7:08 PM, Ali Akbar wrote:
>     Another positive benefit is that this won't break the code unless it
>     uses the new API. This is a problem especially with external code (e.g.
>     extensions), but the new API (initArray*) is not part of 9.4 so there's
>     no such code. So that's nice.
>
>     The one annoying thing is that this makes the API slighly unbalanced.
>     With the new API you can use a shared memory context, which with the old
>     one (not using the initArray* methods) you can't.
>
>     But I'm OK with that, and it makes the patch smaller (15kB -> 11kB).
>
>
> Yes, with this API, we can backpatch this patch to 9.4 (or below) if we need it there.
>
> I think this API is a good compromise of old API and new API. Ideally if we can migrate all code to new API (all code
mustcall initArrayResult* before accumArrayResult*), we can remove parameter MemoryContext rcontext from
accumArrayResult.Currently, the code isn't using the rcontext for anything except for old API calls (in first call to
accumArrayResult).

Until we eliminate the API though, we should leave something in place that still uses the old one, to make certain we
don'taccidentally break it.
 
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



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