Skip to content

Commit

Permalink
Merge pull request #18090 from himdel/pg94
Browse files Browse the repository at this point in the history
Drop postgresql < 9.5 references
  • Loading branch information
bdunne authored Oct 15, 2018
2 parents 1244781 + 426113f commit 71c325f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/initializers/postgres_required_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
def initialize(*args)
super

if postgresql_version < 90400
raise "The version of PostgreSQL being connected to is incompatible with #{Vmdb::Appliance.PRODUCT_NAME} (9.4+ required)"
if postgresql_version < 90500
raise "The version of PostgreSQL being connected to is incompatible with #{Vmdb::Appliance.PRODUCT_NAME} (9.5 required)"
end

if postgresql_version >= 90600
Expand Down
2 changes: 1 addition & 1 deletion lib/extensions/ar_adapter/ar_dba.rb
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def text_table_indexes(table_name, name = "Text Table Indexes")
INNER JOIN pg_class i ON d.indexrelid = i.oid
WHERE i.relkind = 'i'
AND t.relkind = 't'
AND i.oid = #{postgresql_version >= 90400 ? 'd.indexrelid' : 't.reltoastidxid'}
AND i.oid = d.indexrelid
AND t.relname = '#{table_name}'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = 'pg_toast' )
ORDER BY i.relname
Expand Down
2 changes: 1 addition & 1 deletion lib/extensions/ar_table_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module ArTableLock
# It is self-exclusive so that only one session can hold it at a time.
#
# details on locks can be found on postgres docs:
# can be fount http://www.postgresql.org/docs/9.4/static/explicit-locking.html
# http://www.postgresql.org/docs/9.5/static/explicit-locking.html
#
def with_lock(timeout = 60.seconds)
lock = "SHARE ROW EXCLUSIVE"
Expand Down
1 change: 0 additions & 1 deletion spec/models/vmdb_database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@

context ".report_client_connections" do
it "will return an array of hashes and verify hash keys for client connections query" do
skip("awaiting CI database upgrade to 9.2.4") if (described_class.connection.send(:postgresql_version) rescue nil).to_i < 90200
connections = described_class.report_client_connections
expect(connections).to be_kind_of(Array)

Expand Down

0 comments on commit 71c325f

Please sign in to comment.