diff --git a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb index 03932d6cc75..c901213ee7d 100644 --- a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb +++ b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb @@ -101,6 +101,8 @@ module ActiveRecord config = config.symbolize_keys if fallback_handler.master_down? + fallback_handler.verify_master + connection = postgresql_connection(config.dup.merge({ host: config[:replica_host], port: config[:replica_port] }))