diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rb index bd4eb2c1e82..18746093f93 100644 --- a/lib/freedom_patches/active_record_base.rb +++ b/lib/freedom_patches/active_record_base.rb @@ -5,6 +5,8 @@ class ActiveRecord::Base conn = ActiveRecord::Base.connection sql = ActiveRecord::Base.send(:sanitize_sql_array, args) conn.raw_connection.exec(sql) + rescue PG::ReadOnlySqlTransaction + Rails.logger.warn("WARN: PostgreSQL is in a readonly state. Performed a noop") end def self.exec_sql_row_count(*args)