DBZ-7015 Enable replication slot advance check

This reverts commit 925de0184c.
This commit is contained in:
Praveen Burgu 2023-10-06 12:59:55 -07:00 committed by Jiri Pechanec
parent 49ff78ae9a
commit 7fd68a5a0d
2 changed files with 3 additions and 2 deletions

View File

@ -452,6 +452,9 @@ else if (e.getMessage().matches("ERROR: cannot advance replication slot to.*")
|| PSQLState.OBJECT_NOT_IN_STATE.getState().equals(e.getSQLState())) {
switch (connectorConfig.getEventProcessingFailureHandlingMode()) {
case FAIL:
throw new DebeziumException(
String.format("Cannot seek to the last known offset '%s' on replication slot '%s'. Error from server: %s", lsn.asString(), slotName,
e.getMessage()));
case WARN:
LOGGER.warn("Cannot seek to the last known offset '{}' on replication slot '{}'. Error from server: '{}'", lsn.asString(), slotName,
e.getMessage(), e);

View File

@ -3296,8 +3296,6 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception {
@Test
@FixFor("DBZ-5739")
@SkipWhenDatabaseVersion(check = LESS_THAN, major = 11, reason = "This needs pg_replication_slot_advance which is supported only on Postgres 11+")
@Ignore
// Disabled due to potential unreliability in corner cases
public void shouldStopConnectorOnSlotRecreation() throws InterruptedException {
final LogInterceptor logInterceptor = new LogInterceptor(PostgresConnectorIT.class);