FIX: Incorrect subscription in `PostgreSQLFallbackHandler`.

FIX: Incorrect subscription in PostgreSQLFallbackHandler.

diff --git a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
index 4c3ba60..7b83711 100644
--- a/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
+++ b/lib/active_record/connection_adapters/postgresql_fallback_adapter.rb
@@ -16,8 +16,8 @@ class PostgreSQLFallbackHandler
     @mutex = Mutex.new
     @initialized = false
 
-    MessageBus.subscribe(DATABASE_DOWN_CHANNEL) do |payload, pid|
-      if @initialized && pid != Process.pid
+    MessageBus.subscribe(DATABASE_DOWN_CHANNEL) do |payload|
+      if @initialized && payload.data["pid"].to_i != Process.pid
         begin
           RailsMultisite::ConnectionManagement.with_connection(payload.data['db']) do
             clear_connections
diff --git a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
index 5603609..23b3032 100644
--- a/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
+++ b/spec/components/active_record/connection_adapters/postgresql_fallback_adapter_spec.rb
@@ -81,6 +81,7 @@ describe ActiveRecord::ConnectionHandling do
         end.first
 
         expect(message.data[:db]).to eq('default')
+        expect(message.data[:pid]).to eq(Process.pid)
 
         expect { ActiveRecord::Base.postgresql_fallback_connection(config) }
           .to change { Discourse.readonly_mode? }.from(false).to(true)

GitHub sha: 426907cb