diff --git a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb index f2ab2247e33..24fa8260a0d 100644 --- a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb +++ b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb @@ -72,7 +72,7 @@ class PostgreSQLFallbackHandler if is_connection_active logger.warn "#{log_prefix}: Master server is active. Reconnecting..." - clear_connections + MessageBus.publish(DATABASE_DOWN_CHANNEL, db: namespace) self.master_up(key) disable_readonly_mode Sidekiq.unpause!