From 9d6449ae92cd2dc0dd442023e4429540c9c9beee Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 19 Oct 2017 15:39:03 +0800 Subject: [PATCH] Revert "Guard `ActionRecord::Base.exec_sql` against a readonly PostgreSQL cluster." This reverts commit c2a5e603c22ed104cfe48f1d93338fea98f8fd23. --- lib/freedom_patches/active_record_base.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/freedom_patches/active_record_base.rb b/lib/freedom_patches/active_record_base.rb index 18746093f93..bd4eb2c1e82 100644 --- a/lib/freedom_patches/active_record_base.rb +++ b/lib/freedom_patches/active_record_base.rb @@ -5,8 +5,6 @@ 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)