Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrett Walker <brett@digitalmoksha.com>2017-12-05 19:43:47 +0300
committerStan Hu <stanhu@gmail.com>2017-12-05 19:43:47 +0300
commit02d97d46216b60568fb248f9aeb779528abd8e9c (patch)
treee8655dbc12e78e2f20e394564eb182b5eeead88f /lib
parent784edd654b8ef36535d3c1773b7a43d8f3c19b23 (diff)
add Gitlab::Database.replication_slots_supported?
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/database.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index cd7b4c043da..96922e1a62f 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -50,6 +50,10 @@ module Gitlab
postgresql? && version.to_f >= 9.3
end
+ def self.replication_slots_supported?
+ postgresql? && version.to_f >= 9.4
+ end
+
def self.nulls_last_order(field, direction = 'ASC')
order = "#{field} #{direction}"