| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> | 
|---|---|
| To: | Roland Walter <rwa(at)mosaic-ag(dot)com> | 
| Cc: | pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: BUG #1240: memory leak in JDBC driver build 215 | 
| Date: | 2004-09-06 15:54:59 | 
| Message-ID: | Pine.LNX.4.61.0409061745020.2431@sablons.cri.ensmp.fr | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
> 328   [main] DEBUG com.mosaicag.rwa.dbutil.standard.DefaultCsvExport  -
> executing SQL-Stmt: SELECT * FROM transaction WHERE transaction_date >=
> to_timestamp('01.01.2002', 'DD.MM.YYYY') AND transaction_date <
> to_timestamp('01.01.2003', 'DD.MM.YYYY')
> java.lang.OutOfMemoryError
> Exception in thread "main"
Maybe the JDBC drivier tries to allocate the whole result of the query?
If so, it is not a memory leak, it's a big memory need;-)
You might try using a cursor manually (well, if it is the problem, then it 
just shows that jdbc should do it by default). Something like:
DECLARE CURSOR foo FOR your-select-query...;
FETCH FORWARD 10 FROM foo;
FETCH FORWARD 10 FROM foo;
FETCH FORWARD 10 FROM foo;
...
CLOSE foo;
Hope this help.
-- 
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roland Walter | 2004-09-06 16:09:39 | Re: BUG #1240: memory leak in JDBC driver build 215 | 
| Previous Message | PostgreSQL Bugs List | 2004-09-06 15:08:23 | BUG #1240: memory leak in JDBC driver build 215 |