Re: [PATCH v1] fix potential memory leak in untransformRelOptions

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [PATCH v1] fix potential memory leak in untransformRelOptions
Дата
Msg-id 5B427D2A-F0C4-4C18-AA70-329DDA576F2A@yesql.se
обсуждение исходный текст
Ответ на [PATCH v1] fix potential memory leak in untransformRelOptions  (Junwang Zhao <zhjwpku@gmail.com>)
Список pgsql-hackers
> On 1 Sep 2022, at 10:36, Junwang Zhao <zhjwpku@gmail.com> wrote:

> *TextDatumGetCString* calls palloc to alloc memory for the option
> text datum, in some cases the the memory is allocated in
> *TopTransactionContext*, this may cause memory leak for a long
> running backend.

Wouldn't that be a fairly small/contained leak in comparison to memory spent
during a long running transaction?  Do you have any example of transforming
reloptions in a loop into TopTransactionContext where it might add up?

--
Daniel Gustafsson        https://vmware.com/




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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Proposal: Allow walsenders to send WAL directly from wal_buffers to replicas
Следующее
От: Dave Page
Дата:
Сообщение: Re: Tracking last scan time