diff options
author | Rémy Coutable <remy@rymai.me> | 2018-05-18 17:54:47 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-05-30 13:05:49 +0300 |
commit | fee3fe72904e88d6480822ef307cffeea2c34d90 (patch) | |
tree | b87c5d14584c8375bbb6e32a1dcdf49fde7c83de /lib | |
parent | 5e39c6d75d277920c02c4ad28e4f22be2aaa1458 (diff) |
Merge branch 'memoize-database-version' into 'master'
Memoize Gitlab::Database.version
See merge request gitlab-org/gitlab-ce!19021
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/database.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index 76501dd50e8..d49d055c3f2 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -43,7 +43,7 @@ module Gitlab end def self.version - database_version.match(/\A(?:PostgreSQL |)([^\s]+).*\z/)[1] + @version ||= database_version.match(/\A(?:PostgreSQL |)([^\s]+).*\z/)[1] end def self.join_lateral_supported? |