Thread

  1. memory leaks fixed?

    Nick T <ntaylor84@earthlink.net> — 2001-04-05T13:56:58Z

    Hi all:
    
    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?
    
    Thank you
    
    Nick
    
    
    
    
  2. Re: memory leaks fixed?

    Denis Perchine <dyp@perchine.com> — 2001-04-08T07:13:17Z

    Hello,
    
    > 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 some still. Although not that large as mentioned in the comments.
    If you have long-running cursor, and tables involved in this cursor are 
    heavily updated, you will end with 200Mb postmaster in 1-2 days.
    
    -- 
    Sincerely Yours,
    Denis Perchine
    
    ----------------------------------
    E-Mail: dyp@perchine.com
    HomePage: http://www.perchine.com/dyp/
    FidoNet: 2:5000/120.5
    ----------------------------------
    
    
  3. Re: memory leaks fixed?

    Peter Eisentraut <peter_e@gmx.net> — 2001-04-08T11:05:38Z

    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/