pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Marc Cousin <mcousin@sigma.fr>
Cc: pgsql-admin@postgresql.org
Subject: Re: plpgsql function seems to be leaking memory
Date: Tue, 24 Jun 2008 17:37:35 +0200
Message-ID: <486114BF.7040901@lelarge.info> (raw)
In-Reply-To: <16759.1214319370@sss.pgh.pa.us>
References: <200806241056.29589.mcousin@sigma.fr>
	<16759.1214319370@sss.pgh.pa.us>

Tom Lane a écrit :
> Marc Cousin <mcousin@sigma.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



view thread (6+ messages)  latest in thread

Message-ID: <486114BF.7040901@lelarge.info>
Permalink:  ../486114BF.7040901@lelarge.info/
Also on:    postgresql.org/message-id/486114BF.7040901@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: guillaume@lelarge.info, tgl@sss.pgh.pa.us, mcousin@sigma.fr
  Subject: Re: plpgsql function seems to be leaking memory
  In-Reply-To: <486114BF.7040901@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox