From f7607a0b5e106dc50f2dcfafad092bda9f91f979 Mon Sep 17 00:00:00 2001 From: Shayon Mukherjee Date: Tue, 6 Feb 2024 16:35:51 -0500 Subject: [PATCH] Capture the database system is in recovery mode error (#24) This allows to retry queries which experience: the database system is in recovery mode --- lib/rails_pg_adapter/patch.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rails_pg_adapter/patch.rb b/lib/rails_pg_adapter/patch.rb index 9b43c36..5ed1a0b 100644 --- a/lib/rails_pg_adapter/patch.rb +++ b/lib/rails_pg_adapter/patch.rb @@ -16,6 +16,7 @@ module Patch "is not currently accepting connections", "too many connections", "Connection refused", + "the database system is in recovery mode" ].freeze CONNECTION_ERROR_RE = /#{CONNECTION_ERROR.map { |w| Regexp.escape(w) }.join("|")}/.freeze