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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Re: Is there a memory leak in commit 8561e48?
Дата
Msg-id 20180420033708.GA7613@paquier.xyz
обсуждение исходный текст
Ответ на Re: Is there a memory leak in commit 8561e48?  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Fri, Apr 20, 2018 at 10:00:38AM +0800, jian.long@i-soft.com.cn wrote:
> what about just free _SPI_stack in AtEOXact_SPI? if the transaction
> end was initiated by SPI , AtEOXact_SPI will do nothing.  For example:
> @@ -283,6 +295,8 @@ AtEOXact_SPI(bool isCommit)
>                                  errmsg("transaction left non-empty SPI stack"),
>                                  errhint("Check for missing \"SPI_finish\" calls.")));
>
> +       if (_SPI_stack)
> +               pfree(_SPI_stack);

Sure, but that is rather inconsistent with the handling which exists
using TopTransactionContext where the API stack is deleted at the same
time as the transaction context, which causes this approach to be
inconsistent for atomic and non-atomic calls of SPI_connect_ext.  Let's
see what is Peter's take here first.
--
Michael

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Should we add GUCs to allow partition pruning to be disabled?
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [sqlsmith] Unpinning error in parallel worker