Re: [PATCH] ecpg: fix progname memory leak

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: [PATCH] ecpg: fix progname memory leak
Дата
Msg-id 54563534356259c716e008d1e5786f87129b5c28.camel@postgresql.org
обсуждение исходный текст
Ответ на Re: [PATCH] ecpg: fix progname memory leak  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: [PATCH] ecpg: fix progname memory leak  (Bruce Momjian <bruce@momjian.us>)
Re: [PATCH] ecpg: fix progname memory leak  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 2020-10-08 at 12:27 -0400, Bruce Momjian wrote:
> On Thu, Oct  8, 2020 at 10:35:41AM +0900, Michael Paquier wrote:
> > On Wed, Oct 07, 2020 at 02:31:54PM +0300, Maksim Kita wrote:
> > > Fix progname memory leak in ecpg client.
> > > Issue taken from todo list https://wiki.postgresql.org/wiki/Todo.
> > 
> > FWIW, I don't see much point in doing that.  For one, we have a
> > more-or-less established rule that progname remains set until the
> > application leaves, and there are much more places where we leak
> > memory like that.  As one example, just see the various places
> > where
> > we use pg_strdup for option parsing.  At the end, it does not
> > really
> > matter as these are applications running for a short amount of
> > time.
> 
> 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.

Michael 
-- 
Michael Meskes
Michael at Fam-Meskes dot De
Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Probably typo in multixact.c
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCH] ecpg: fix progname memory leak