Re: SRF memory leaks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SRF memory leaks
Дата
Msg-id 20396.1203991229@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SRF memory leaks  (Neil Conway <neilc@samurai.com>)
Ответы Re: SRF memory leaks  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
>           if (funcTupdesc)
> +         {
>               tupledesc_match(node->tupdesc, funcTupdesc);
> +             FreeTupleDesc(funcTupdesc);
> +         }
>       }

I find this part of the patch to be a seriously bad idea.
nodeFunctionscan has no right to assume that the function has returned
an expendable tupdesc; indeed, I would think that the other case is
more nearly what's expected by the API for SRFs.  We certainly daren't
backpatch such a change.

A safer fix would be to try to make the tupdesc be in the new
multi_call_ctx when it's being created by the funcapi.c code.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix pgstatindex using for large indexes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Shlib exports file refactoring