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

Re: plpgsql function seems to be leaking memory

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marc Cousin <mcousin(at)sigma(dot)fr>, pgsql-admin(at)postgresql(dot)org
Subject: Re: plpgsql function seems to be leaking memory
Date: 2008-06-24 15:37:35
Message-ID: 486114BF.7040901@lelarge.info (view raw or flat)
Thread:
Lists: pgsql-admin
Tom Lane a écrit :
> Marc Cousin <mcousin(at)sigma(dot)fr> writes:
>> I'm having a problem with plpgsql functions leaking memory.
> 
> Your example shows absolutely no memory leak here, in either 8.3.3
> or CVS HEAD.
> 
>> I see the postgresql process growing from 8MB to about 400 MB during this 
>> run...
> 
> What do you have shared_buffers set to?  I think you might be getting
> fooled by top's treatment of shared memory (ie, it starts to count
> shared pages after the process touches them for the first time).
> 

That's what I thought at first when I saw Marc's email. I tried his 
example many times, with different values for shared_buffers. RSS column 
climbs until it reaches more or less the shared_buffers configuration. 
But, if I launch another psql, this process will have a much lower value 
on the RSS column. Shouldn't it get the RSS at the same value, even when 
the process starts ?

I'm a bit puzzled by this column, anyone has a URL where I can find more 
info?

Regards.


-- 
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com

In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2008-06-24 15:48:11
Subject: Re: plpgsql function seems to be leaking memory
Previous:From: Marc CousinDate: 2008-06-24 15:29:09
Subject: Re: plpgsql function seems to be leaking memory

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