Question about MemoryContexts and functions that returns sets.

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Question about MemoryContexts and functions that returns sets.
Date: 2006-03-20 10:47:41
Message-ID: 441E884D.7010707@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
A PL/Java user reports that his backend runs out of memory when he uses
PL/Java to execute huge queries towards a remote database and return the
result. PL/Java is designed not to collect data in memory when it
returns result sets. Each call to the function handler will be
dispatched to the corresponding 'ResultSet.next()' in order to retrieve
and propagate one row at a time. Yet, it seems the data is collected
somewhere. An excerpt from the user at the time he runs out of memory
looks like this:

SPI Proc: 273670144 total in 67 blocks; 3840 free (29 chunks); 273666304 used
...
ExecutorState: 1141402016 total in 204 blocks; 7923848 free (3633 chunks); 1133478168 used
...

so obviously, I'm doing something wrong in my code. Any advice what I
should be looking for?

Kind Regards,
Thomas Hallgren

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Mair 2006-03-20 10:49:25 [Pgbuildfarm-members] guppie: 64MB RAM too small?
Previous Message Stefan Kaltenbrunner 2006-03-20 09:54:51 Re: [Pgbuildfarm-members] guppie: 64MB RAM too small?