Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 20 Jan 2025 15:08:28 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3483: Support adaptive fetching without enforcing memory limits, and/or have a separate buffer size for it In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2602663731 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3483 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3483#issuecomment-2602663731 Content-Type: text/plain; charset=utf-8 I've raised a question on the hackers list: https://www.postgresql.org/message-id/CAB%3DJe-HyOz00Ms6pMuOJoCig1eNDp1hpejMvqz%3Dg6M--hoxnKA%40mail.gmail.com >One would also consider that someone may want to only limit by byte size, and not by row count. For example, maybe you pass 0 rows to [Execute](https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-EXECUTE) but then still request a byte size limit using the proposed mechanism - in this case, PG would fetch as many rows as possible that fit within the byte size limit. I am afraid it might break the semantics: "execute 0" was supposed to fetch all the rows, and the application might assume extra fetches would not be required after "fetch all rows" execute. So I think it might be ok to keep "fetch all" intact.