Set JDBC `AutoCommit` to false in the REST API for specifying non-zero fetch size
@@ -134,7 +134,9 @@ public class KnowledgeBaseConnector {
public void connectToKnowledgeBase() {
try {
logger.info("Establishing connection to the " + kbForge + " KnowledgeBase at " + kbUrl + ", user " + kbUser + "...");
- dbContext = PostgresConnector.getDSLContext(kbUrl, kbUser, true);
+ // JDBC auto-commit should be false: (1) Postgres doesn't like it when using non-zero fetch size.
+ // (2) It is not usually a good practice.
+ dbContext = PostgresConnector.getDSLContext(kbUrl, kbUser, false);
kbDao = new MetadataDao(dbContext);
} catch (SQLException e) {
logger.error("Couldn't connect to the KnowledgeBase", e);
