DBZ-7951 Call commit after running DDL statements

PostgreSQL does not auto-commit DDL statements so, currently, other clients trying to execute DDL statements might get stuck until commit is invoked in storeRecord for instance.
This commit is contained in:
Piotr Piastucki 2024-06-13 07:37:28 +02:00 committed by Jiri Pechanec
parent 4c3781a22f
commit 06f319d221
3 changed files with 3 additions and 0 deletions

View File

@ -413,6 +413,7 @@ Peter Junos
Peter Larsson
Peter Urbanetz
Philip Sanetra
Piotr Piastucki
Plugaru Tudor
Poonam Meghnani
Pradeep Mamillapalli

View File

@ -263,6 +263,7 @@ public void initializeStorage() {
ps.execute();
LOG.info("Created table in given database...");
}
conn.commit();
}
}, "initialize storage", false);
}

View File

@ -105,6 +105,7 @@ private void initializeTable() throws SQLException {
try (var ps = conn.prepareStatement(config.getTableCreate())) {
ps.execute();
}
conn.commit();
}, "checking / creating table", false);
}