Re: Fix for memory leak in dblink

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Fix for memory leak in dblink
Дата
Msg-id 4B4CB3F0.1000605@joeconway.com
обсуждение исходный текст
Ответ на Fix for memory leak in dblink  (Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>)
Список pgsql-hackers
On 01/11/2010 07:43 PM, Takahiro Itagaki wrote:
> There is a memory leak in dblink when we cancel a query during
> returning tuples. It could leak a PGresult because memory used
> by it is not palloc'ed one. I wrote a patch[1] before, but I've
> badly used global variables to track the resource.
>
> The attached is a cleaned up patch rewritten to use a tuplestore
> (SFRM_Materialize mode) to return tuples suggested at [2]. Since
> we don't return from the dblink function in tuplestore mode, we
> can surely release the PGresult with a PG_CATCH block even on error.

Thanks -- I'll review this weekend.

Joe


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: mailing list archiver chewing patches
Следующее
От: Dave Page
Дата:
Сообщение: Re: mailing list archiver chewing patches