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