Skip to content

Commit b94ef7a

Browse files
committed
fix: autocommit
1 parent df35a2f commit b94ef7a

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/main/java/io/supertokens/storage/postgresql/ConnectionPool.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ private synchronized void initialiseHikariDataSource() throws SQLException, Stor
5555
PostgreSQLConfig userConfig = Config.getConfig(start);
5656
config.setDriverClassName("org.postgresql.Driver");
5757
config.setTransactionIsolation("TRANSACTION_SERIALIZABLE");
58+
config.setAutoCommit(false);
5859

5960
String scheme = userConfig.getConnectionScheme();
6061

src/main/java/io/supertokens/storage/postgresql/Start.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ protected <T> T startTransactionHelper(TransactionLogic<T> logic, TransactionIso
459459
throw e;
460460
} finally {
461461
if (con != null) {
462-
con.setAutoCommit(true);
463462
con.close();
464463
}
465464
}

0 commit comments

Comments
 (0)