Re: Postgres eats up memory when using cursors - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres eats up memory when using cursors
Date
Msg-id 21844.983471542@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres eats up memory when using cursors  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Postgres eats up memory when using cursors
List pgsql-general
Peter Eisentraut <peter_e@gmx.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

pgsql-general by date:

Previous
From: Scott Holmes
Date:
Subject: Users in pg_shadow
Next
From: Denis Perchine
Date:
Subject: Re: Postgres eats up memory when using cursors