Re: Aggregate-function space leakage
| От | Tom Lane |
|---|---|
| Тема | Re: Aggregate-function space leakage |
| Дата | |
| Msg-id | 23043.1248373949@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Aggregate-function space leakage (Hitoshi Harada <umi.tanuki@gmail.com>) |
| Ответы |
Re: Aggregate-function space leakage
|
| Список | pgsql-hackers |
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> So two ideas from Tom seem to me a little worse than that. Modifying
> Agg.c might add overhead to reset context group by group and forcing
> array_agg() (i.e. user aggregates) to distinguish hash-mode and
> group-mode is definitely heavy for users.
I agree that the second choice would be a pain. I think you are
overestimating the cost of the first choice though. We have already
taken steps to ensure that MemoryContextReset is *extremely* cheap
when there is nothing for it to do. If there is something for it to
do, well, that's the case that we have a memory leak now. Also,
resetting the context should be cheaper than retail pfree's anyway.
Anyway, I'll go take a look at exactly what would be involved in the
first choice.
regards, tom lane
В списке pgsql-hackers по дате отправления: