Cursors for PGJDBC queries

From: "Rashmi V Bharadwaj" <rvbharad(at)in(dot)ibm(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Cursors for PGJDBC queries
Date: 2019-08-01 07:10:10
Message-ID: OFBD5B2616.7CB99C1C-ON00258449.00276250-00258449.00276254@notes.na.collabserv.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<font face="Verdana,Arial,Helvetica,sans-serif" size="2"><div>Hi,</div><div><br></div><div>I am trying to set the fetch size for my ResultSet to avoid Out of Memory exception. I have created the Statement with ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY and ResultSet.HOLD_CURSORS_OVER_COMMIT and I've also disabled auto commit as mentioned in the link <a target="_blank" href="https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor" title="https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor">Getting results based on a cursor</a>. I am still getting Out of memory error. My SQL query is a simple SELECT statement to retrieve all the rows from a table. According to <a target="_blank" href="https://postgrespro.com/list/thread-id/2370772" title="https://postgrespro.com/list/thread-id/2370772">https://postgrespro.com/list/thread-id/2370772</a>, the holdability must be CLOSE_CURSORS_AT_COMMIT. Could you please confirm this is a requirement?<br></div><div><br></div><div>Thanks,</div><div>Rashmi<br></div></font><BR>

Attachment Content-Type Size
unknown_filename text/html 1.1 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-08-01 07:30:29 Re: Cursors for PGJDBC queries
Previous Message Ron 2019-08-01 04:21:15 Re: adding more space to the existing server