diff --git a/src/Storages/PostgreSQL/PostgreSQLReplicationHandler.cpp b/src/Storages/PostgreSQL/PostgreSQLReplicationHandler.cpp index f9bfe1d174a..322ad3c78c0 100644 --- a/src/Storages/PostgreSQL/PostgreSQLReplicationHandler.cpp +++ b/src/Storages/PostgreSQL/PostgreSQLReplicationHandler.cpp @@ -417,7 +417,15 @@ void PostgreSQLReplicationHandler::consumerFunc() { assertInitialized(); - bool schedule_now = getConsumer()->consume(); + bool schedule_now = true; + try + { + schedule_now = getConsumer()->consume(); + } + catch (...) + { + tryLogCurrentException(__PRETTY_FUNCTION__); + } if (stop_synchronization) {