Re: [PATCH] ecpg: fix progname memory leak

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] ecpg: fix progname memory leak
Дата
Msg-id 2575996.1602177445@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] ecpg: fix progname memory leak  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> On Thu, 2020-10-08 at 12:27 -0400, Bruce Momjian wrote:
>> Agreed, but what does the TODO item mean then?
>> 
>>     Fix small memory leaks in ecpg
>>         Memory leaks in a short running application like ecpg are not really
>>         a problem, but make debugging more complicated 
>> 
>> Should it be removed?

> I'd say yes, let's remove it. Actually I wasn't even aware it's on
> there. While I agree that it makes debugging of memory handling in ecpg
> more difficult, I don't see much of a point in it.

Agreed.  In theory there might be some point in removing leaks that happen
per-statement, so as to avoid unreasonable memory bloat when processing an
extremely long input file.  In practice nobody has complained about that,
and if somebody did I'd probably question the sanity of putting so much
code into one file.  (The C compiler would likely bloat even more while
processing the output...)  Moreover, given the way the ecpg grammar works,
it'd be really painful to avoid all such leaks, and it might well
introduce bugs not fix them.

In any case, if this TODO item is going to lead to ideas as dubious
as "let's free progname before exiting", it's not helpful.

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCH] ecpg: fix progname memory leak
Следующее
От: "Daniel Westermann (DWE)"
Дата:
Сообщение: Re: Wrong example in the bloom documentation