Re: possible memory leak with SRFs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible memory leak with SRFs
Дата
Msg-id 8992.1273335136@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible memory leak with SRFs  (Joe Conway <mail@joeconway.com>)
Ответы Re: possible memory leak with SRFs  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> I think this is an example of why we still need to implement a real
> SFRM_ValuePerCall mode that allows results to be pipelined. Yes,
> ValuePerCall sort of works from the targetlist, but it is pretty much
> useless for the use cases where people really want to use it.

> Or would a FROM clause ValuePerCall suffer the same issue?

I don't think it'd be a big problem.  We could use the technique
suggested in the comments in ExecMakeTableFunctionResult: use a separate
memory context for evaluating the arguments than for evaluating the
function itself.  This will work in FROM because we can insist the SRF
be at top level.  The problem with SRFs in tlists is that they can be
anywhere and there can be more than one, so it's too hard to keep track
of what to reset when.
        regards, tom lane


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: possible memory leak with SRFs
Следующее
От: Joe Conway
Дата:
Сообщение: Re: possible memory leak with SRFs