Re: Unexpected memory usage for repeated inserts within plpgsql function

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: Unexpected memory usage for repeated inserts within plpgsql function
Дата
Msg-id CAFiTN-tsr=pGsyDmZEXJdWw8RKncua6OFzhkwKbsEv2AcwwecA@mail.gmail.com
обсуждение исходный текст
Ответ на Unexpected memory usage for repeated inserts within plpgsql function  ("happy times" <guangzhouzhang@qq.com>)
Ответы Re: Unexpected memory usage for repeated inserts within plpgsql function  (Guangzhou Zhang <35514815@qq.com>)
Список pgsql-hackers

On Thu, Jul 21, 2016 at 4:09 PM, happy times <guangzhouzhang@qq.com> wrote:
My question: Is this problem as-designed?

Actually problem is in exec_stmt_dynexecute function, We make a copy of the query string,
and before we free it, it thow an error from SPI_execute (because table does not exist)
And this is happening in infinite loop, so we are seeing memory leak.

exec_stmt_dynexecute
{
....

/* copy it out of the temporary context before we clean up */

querystr = pstrdup(querystr);

}


--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [BUG] pg_basebackup from disconnected standby fails
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE