diff options
author | Mike Lewis <mlewis@gitlab.com> | 2019-06-07 20:13:17 +0000 |
---|---|---|
committer | Mike Lewis <mlewis@gitlab.com> | 2019-06-07 20:13:17 +0000 |
commit | 99df0218f82b851b017bd0eea1b8351dc89df6ed (patch) | |
tree | b01f884fbd1418dd5465fc1741f1620061ae8c5c /lib/gitlab/database.rb | |
parent | 3eea6906747d10bea501426febaf15d2c209e06a (diff) | |
parent | e07b2b277f79bc25cdce22ca2defba1ba80791aa (diff) | |
download | gitlab-ce-99df0218f82b851b017bd0eea1b8351dc89df6ed.tar.gz |
Merge branch 'master' into 'docs/fix-example-dot-net'
# Conflicts:
# doc/user/project/clusters/serverless/index.md
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r-- | lib/gitlab/database.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index b6ca777e029..8da98cc3909 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -27,6 +27,10 @@ module Gitlab config['adapter'] end + def self.human_adapter_name + postgresql? ? 'PostgreSQL' : 'MySQL' + end + def self.mysql? adapter_name.casecmp('mysql2').zero? end @@ -76,7 +80,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 +102,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}" |