DBZ-912 Upgrading to Postgres driver 42.2.5
This commit is contained in:
parent
00a3c3c8ad
commit
f9ede861ba
@ -215,16 +215,18 @@ public boolean dropReplicationSlot(String slotName) {
|
||||
try {
|
||||
execute("select pg_drop_replication_slot('" + slotName + "')");
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
catch (SQLException e) {
|
||||
// slot is active
|
||||
PSQLState currentState = new PSQLState(e.getSQLState());
|
||||
if (PSQLState.OBJECT_IN_USE.equals(currentState)) {
|
||||
if (PSQLState.OBJECT_IN_USE.getState().equals(e.getSQLState())) {
|
||||
LOGGER.warn("Cannot drop replication slot '{}' because it's still in use", slotName);
|
||||
return false;
|
||||
} else if (PSQLState.UNDEFINED_OBJECT.equals(currentState)) {
|
||||
}
|
||||
else if (PSQLState.UNDEFINED_OBJECT.getState().equals(e.getSQLState())) {
|
||||
LOGGER.debug("Replication slot {} has already been dropped", slotName);
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
LOGGER.error("Unexpected error while attempting to drop replication slot", e);
|
||||
}
|
||||
return false;
|
||||
|
@ -165,7 +165,7 @@ public void shouldSupportSSLParameters() throws Exception {
|
||||
assertThat(error).isInstanceOf(ConnectException.class);
|
||||
Throwable cause = error.getCause();
|
||||
assertThat(cause).isInstanceOf(SQLException.class);
|
||||
assertThat(PSQLState.CONNECTION_REJECTED).isEqualTo(new PSQLState(((SQLException)cause).getSQLState()));
|
||||
assertThat(PSQLState.CONNECTION_REJECTED.getState().equals(((SQLException)cause).getSQLState()));
|
||||
}
|
||||
});
|
||||
if (TestHelper.shouldSSLConnectionFail()) {
|
||||
|
4
pom.xml
4
pom.xml
@ -66,7 +66,7 @@
|
||||
<version.confluent.platform>5.0.0</version.confluent.platform>
|
||||
|
||||
<!-- Databases -->
|
||||
<version.postgresql.driver>42.0.0-SNAPSHOT</version.postgresql.driver>
|
||||
<version.postgresql.driver>42.2.5</version.postgresql.driver>
|
||||
<version.mysql.server>5.7</version.mysql.server>
|
||||
<version.mysql.driver>8.0.12</version.mysql.driver>
|
||||
<version.mysql.binlog>0.16.1</version.mysql.binlog>
|
||||
@ -238,7 +238,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.0.0</version>
|
||||
<version>${version.postgresql.driver}</version>
|
||||
</dependency>
|
||||
|
||||
<!--Make sure this version is compatible with the Protbuf-C version used on the server -->
|
||||
|
Loading…
Reference in New Issue
Block a user