Message-ID: From: "lure (@lure)" To: "pgjdbc/pgjdbc" Date: Wed, 12 Jul 2023 17:25:18 +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: lure X-GitHub-Comment-Id: 1632927442 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-1632927442 Content-Type: text/plain; charset=utf-8 `conn.setAutoCommit(false)` is required for the code above to be reproducible in 68ba613810784b375ab855cf1fa639bc5b254ecd/postgresql-42.6.0-sources.jar!/org/postgresql/jdbc/PgStatement.java:509 ``` if (wantsGeneratedKeysOnce || wantsGeneratedKeysAlways) { generatedKeys = currentResult; result = castNonNull(currentResult, "handler.getResults()").getNext(); ``` The currentResult returns null for `getNext()`, hovewer, the `currentResult.getResultSet().next()` returns `true` and the generated values are available.