Aggro napsal(a):
>> 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.
>>
>> Zdenek
>
> 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. I'm interested in this, because
> either you have a memory leak or these is a bug in
> another application called cppcheck which claims that
> you have a memory leak. But if it is too difficult to
> find out, I won't bother you about this anymore as it
> is most likely a minor issue if even that.
Keep in mind that onetime allocated local memory is not reclaimed to OS until
process finished. See sbrk(2) It does not make sense to free memory at the end
(in pg_dump) because it does not have any effect on available memory in OS and
OS clean it soon anyway. I agree that from general point of view it is good to
release unused memory, because process can reuse it. But when you know what you
do then you can break a rule.
Zdenek
--
Zdenek Kotala Sun Microsystems
Prague, Czech Republic http://sun.com/postgresql