Re: memory leaks fixed? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: memory leaks fixed?
Date
Msg-id Pine.LNX.4.30.0104081258230.1236-100000@peter.localdomain
Whole thread Raw
In response to memory leaks fixed?  ("Nick T" <ntaylor84@earthlink.net>)
List pgsql-general
Nick T writes:

> Just finished reading all of the comments at
>
> http://openacs.org/philosophy/why-not-mysql.html
>
> and became concerned about the comments regarding severe memory leaks with
> PostgreSQL.  Is this true?  Have they been fixed?  Are there any
> workarounds?

There are certain queries that require a seemingly unproportional amount
of memory.  Up until verion 7.0, memory in the server was not recovered
until the end of the transaction, so it was possible to run out of memory
when it should have been avoidable.  This is technically not a memory
leak, just a less than optimal use of resources.  However, because of the
way malloc/sbrk work, this memory is no longer available to the operating
system, so it looks like a memory leak.

7.1 uses a better technique to handle the allocated memory, which should
fix most of these cases.  In any case it should be possible to rewrite the
queries, but there is no general procedure on how to do that.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: Joel Burton
Date:
Subject: Re: information on users
Next
From: Peter Eisentraut
Date:
Subject: Re: Better Features document?