Skip to content

Commit

Permalink
test: Explicitly enable synchronous_commit for privileged and replica…
Browse files Browse the repository at this point in the history
…tion connections
  • Loading branch information
sehrope committed May 15, 2021
1 parent 2c99ed7 commit 4a8035c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pgjdbc/src/test/java/org/postgresql/test/TestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public static Connection openPrivilegedDB() throws SQLException {
PGProperty.GSS_ENC_MODE.set(properties,getGSSEncMode().value);
properties.setProperty("user", getPrivilegedUser());
properties.setProperty("password", getPrivilegedPassword());
properties.setProperty("options", "-c synchronous_commit=on");
return DriverManager.getConnection(getURL(), properties);

}
Expand All @@ -326,6 +327,7 @@ public static Connection openReplicationConnection() throws Exception {
PGProperty.PREFER_QUERY_MODE.set(properties, "simple");
properties.setProperty("username", TestUtil.getPrivilegedUser());
properties.setProperty("password", TestUtil.getPrivilegedPassword());
properties.setProperty("options", "-c synchronous_commit=on");
return TestUtil.openDB(properties);
}

Expand Down

0 comments on commit 4a8035c

Please sign in to comment.