mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
FIX: PostgreSQL fallback was broken due to Rails masking exception (#9633)
The PR https://github.com/rails/rails/pull/36612 changes the raised exception if the error message includes the target database name. Since the error message contains the hostname, this could be triggered when the hostname contains the database name.
This commit is contained in:
parent
0ee796f66d
commit
d59d170452
@ -154,7 +154,7 @@ module ActiveRecord
|
||||
begin
|
||||
connection = postgresql_connection(config)
|
||||
fallback_handler.initialized ||= true
|
||||
rescue PG::ConnectionBad => e
|
||||
rescue ::ActiveRecord::NoDatabaseError, PG::ConnectionBad => e
|
||||
fallback_handler.master_down
|
||||
fallback_handler.verify_master
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user