pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: ash211 (@ash211) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #2656: Adaptive Fetch doesn't enable ResultSet streaming
Date: Tue, 21 Feb 2023 22:57:54 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
If you remove the maxResultBuffer setting then I think adaptiveFetch is disabled.
Per https://github.com/pgjdbc/pgjdbc/blob/2b90ad04696324d107b65b085df4b1db8f6c162d/README.md?plain=1#L14..., `adaptiveFetch`
> Requires declaring maxResultBuffer and defaultRowFetchSize for first iteration.
----------------
I recently ran into this, where I had set `adaptiveFetch=true` and `defaultRowFetchSize=10` and `maxResultBuffer=10percent` and yet still a user of my tool observed this failure message: `Result set exceeded maxResultBuffer limit. Received: 103887670; Current limit: 103887667`
It seems that currently this JDBC driver requests "give me N rows" and gets back those N rows, regardless of their size. If postgres server supported such a thing, we may prefer "give me N rows or up to B bytes" and receiving 1..N rows instead of always N. This would enable smoother streaming of a ResultSet, without OOM or hitting `maxResultBuffer` limits while still maintaining reasonably large fetch sizes (not just 1 all the time).
view thread (12+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #2656: Adaptive Fetch doesn't enable ResultSet streaming
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox