From d1929248765bac692df5ebe2a68c4235544fb5bb Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 11 Jun 2018 13:25:30 +0800 Subject: [PATCH] FIX: Can't boot Discourse app with read-only PG connection take 2. --- .../connection_adapters/postgresql_fallback_adapter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb index 15afbbaf104..f2ab2247e33 100644 --- a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb +++ b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb @@ -57,6 +57,8 @@ class PostgreSQLFallbackHandler end def initiate_fallback_to_master + return unless @initialized + @masters_down.hash.keys.each do |key| RailsMultisite::ConnectionManagement.with_connection(key) do begin