Re: Is there a memory leak in commit 8561e48?

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Is there a memory leak in commit 8561e48?
Дата
в 18:42:15
Msg-id
22655.1525189335@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Re: Is there a memory leak in commit 8561e48? "jian.long@i-soft.com.cn" <jian.long@i-soft.com.cn>
Peter Eisentraut  writes:
> The memory leak can be fixed by adding a pfree().

That seems like an odd way to approach this.  Why not just remove the
reset of _SPI_stack and _SPI_stack_depth, so as to subtract code rather
than adding it --- that is, make it actually work like you mistakenly
thought it did?  If we're going to keep the stack in TopMemoryContext,
there's no need to thrash it on every transaction.

			regards, tom lane

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Tom Lane
Дата:
FAQ