Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group