Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Thu, 04 Sep 2025 15:03:26 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #2918: Set defaultRowFetchSize=10000 by default to improve app stability In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 3254148468 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 2918 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/2918#issuecomment-3254148468 Content-Type: text/plain; charset=utf-8 > I'd rather have a "safer" value in the ballpark of 128, and if that's too low for you, 1000 max, but nowhere above that. Currently pgJDBC eats RAM like it's unlimited. I would like that just as much as you do, but it isn't ;) > > Also, why not honor the fetchSize on every SELECT statement regardless of auto-commit ? > > Auto-commit should only affect writing statements (INSERT/UPDATE/DELETE), not read (SELECT) statements, right ? Why is auto-commit even relevant to honoring the fetchSize in the first place ? I'm confused. This is an artifact of MVCC. You need to be in a transaction to create a snapshot to make sure that the data is consistent between fetches