Re: BUG #4496: Memory leak in pg_dump.c? - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #4496: Memory leak in pg_dump.c?
Date
Msg-id 20081030200016.GL3857@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #4496: Memory leak in pg_dump.c?  (Aggro <dvice_null@yahoo.com>)
Responses Re: BUG #4496: Memory leak in pg_dump.c?  (Tomáš Szépe <szepe@pinerecords.com>)
List pgsql-bugs
Aggro wrote:
>
> --- Zdenek Kotala <Zdenek.Kotala@Sun.COM> wrote:
>

> > I think all information is collected and they are
> > used for all pg_dump run. It
> > does not make sense to free them. See line 725.
>
> But is the memory freed at some point? E.g. when
> program shuts down? If it is not freed ever, then it
> is a memory leak.

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.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: Aggro
Date:
Subject: Re: BUG #4496: Memory leak in pg_dump.c?
Next
From: Tom Lane
Date:
Subject: Re: BUG #4496: Memory leak in pg_dump.c?