Re: Postgres eats up memory when using cursors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Denis Perchine <dyp(at)perchine(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres eats up memory when using cursors
Date: 2001-03-01 18:32:22
Message-ID: 21844.983471542@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> Repeating these like mad, psql grows about 1Kb/sec on my machine.
>> This occurs with current sources but NOT with 7.0.2 psql. Peter,
>> any thoughts about that?

> Well, here's a memory leak:

Good catch. I confirm this stops the leak in my test.

> This leaks (columns + 1) per query, 4 bytes in your case. But is has been
> there in 7.0 as well.

Ooops, my bad --- repeating my test shows process growth in 7.0 as well.
I had missed it the first time because I'd previously done a plain
"select *", which ballooned the process footprint of psql. So the
leakage was happening within previously-grabbed memory and wasn't
obvious in "top".

This doesn't seem to actually be related to Denis' problem, but a
leak is a leak ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Denis Perchine 2001-03-01 18:41:51 Re: Postgres eats up memory when using cursors
Previous Message Scott Holmes 2001-03-01 18:30:18 Users in pg_shadow