diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-03-14 18:25:05 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-03-14 18:25:05 +0300 |
commit | 26134eeeceff1bcbaee9fe4c3fc3cb08da2b84b2 (patch) | |
tree | 95cb6a7fb72672987e6891f76f95079b3d0eecd1 /lib/gitlab/database.rb | |
parent | 80eaed2aeb3f0544151de15fed7969b34ef2f7a8 (diff) |
Rename pg_stat_wal_receiver_supported? DB helper
From pg_stat_wal_receiver_supported? to
postgresql_minimum_supported_version?
Also add test coverage
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r-- | lib/gitlab/database.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index b6ca777e029..e2637ad602a 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -76,7 +76,7 @@ module Gitlab postgresql? && version.to_f >= 9.4 end - def self.pg_stat_wal_receiver_supported? + def self.postgresql_minimum_supported_version? postgresql? && version.to_f >= 9.6 end @@ -98,6 +98,10 @@ module Gitlab Gitlab::Database.postgresql_9_or_less? ? 'pg_last_xlog_replay_location' : 'pg_last_wal_replay_lsn' end + def self.pg_last_xact_replay_timestamp + 'pg_last_xact_replay_timestamp' + end + def self.nulls_last_order(field, direction = 'ASC') order = "#{field} #{direction}" |