FIX: Use exact patht to ensure we always redirect with the right format.

This commit is contained in:
Guo Xiang Tan
2017-09-27 11:55:06 +08:00
parent 5324c01209
commit d4388f54a2
4 changed files with 6 additions and 20 deletions

View File

@ -119,14 +119,7 @@ module ActiveRecord
def verify_replica(connection)
value = connection.raw_connection.exec("SELECT pg_is_in_recovery()").values[0][0]
if !value
begin
raise "Replica database server is not in recovery mode."
ensure
connection.close
end
end
raise "Replica database server is not in recovery mode." if !value
end
end
end