Thread: Re: Cursors for PGJDBC queries
On Thu, Aug 1, 2019 at 9:10 AM Rashmi V Bharadwaj <rvbharad@in.ibm.com> wrote: > I am trying to set the fetch size for my ResultSet to avoid Out of Memory exception. I have created the Statement withResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY and ResultSet.HOLD_CURSORS_OVER_COMMIT and I've also disabledauto commit as mentioned in the link Getting results based on a cursor. I am still getting Out of memory error. MySQL query is a simple SELECT statement to retrieve all the rows from a table. According to https://postgrespro.com/list/thread-id/2370772,the holdability must be CLOSE_CURSORS_AT_COMMIT. Could you please confirmthis is a requirement? Hard to say without more information. Could it be something you need to set on the jvm like However, you should post on the JDBC mailing list <https://www.postgresql.org/list/pgsql-jdbc/>.
On Thu, Aug 1, 2019 at 9:30 AM Luca Ferrari <fluca1978@gmail.com> wrote: > Hard to say without more information. Could it be something you need > to set on the jvm like sorry, I was intended to write -Xms256m -Xmx1024m to adjust the jvm memory limits. Again I believe that the jdbc mailing list is the right place to ask for such a problem. Luca