In autocommit mode, the transaction is committed before returning to the caller.
streaming rows from a MVCC store like Postgres requires the cursor and therefore transaction to remain open
(otherwise some concurrent actor could modify or delete the row-version out from under you).
So you either buffer the result set and close the cursor + txn, or keep
the txn open and stream the data out, but there is not a middle ground option.
This is covered in a bit more detail in the upstream docs:
https://jdbc.postgresql.org/documentation/94/query.html#query-with-cursor
> , but try disabling auto-commit on your connection prior to running your query:
>
> handle.getConnection().setAutoCommit(false);
>
> -Matt
>
> On Fri, Jun 9, 2017 at 2:19 PM, Matthias <
fronten...@gmail.com> wrote:
> Yes, I still don't have a solution for this.
>
> --
> You received this message because you are subscribed to the Google Groups "jDBI" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jdbi+uns...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups "jDBI" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jdbi+uns...@googlegroups.com.