Re: BUG #4496: Memory leak in pg_dump.c?

From: Tomáš Szépe <szepe(at)pinerecords(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Aggro <dvice_null(at)yahoo(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4496: Memory leak in pg_dump.c?
Date: 2008-10-30 20:25:58
Message-ID: 20081030202558.GH13130@louise.pinerecords.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> A pg_dump run is comparatively short-lived, so if Zdenek is right then
> there's no important leak here -- we're counting on program exit to
> release the memory. There's probably little point in releasing things
> earlier than that.

Well, I'd tend to consider any logical part of a program that fails to
release the memory it uses to be bad coding practice. You never know
when you're going to need to shuffle things around, change the context
of the code in a way that makes it long-lived, in turn causing the leak
to become a real problem. Also, don't you like seeing the free()s paired
to their mallocs()s in a way that makes the allocations intuitively
correct? :)

--
Tomáš Szépe <szepe(at)pinerecords(dot)com>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Harvey, Allan AC 2008-10-30 22:10:46 Re: Upgrade from 7.4.5 to 8.3.3
Previous Message Tom Lane 2008-10-30 20:06:28 Re: BUG #4496: Memory leak in pg_dump.c?