Skip to content
Snippets Groups Projects
Commit 0b7eb2d6 authored by Graeme Gillies's avatar Graeme Gillies
Browse files

Merge branch 'fix-gin-index-detection-14-10' into '14-10-stable-ee'

Fix https://gitlab.com/gitlab-org/gitlab/-/issues/361776:  Fix gin index detection on background_migration/project_namespaces

See merge request gitlab-org/gitlab!87374
parents ec32d780 ae465ad7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -55,7 +55,7 @@ module Gitlab
end
 
def cleanup_gin_index(table_name)
index_names = ActiveRecord::Base.connection.select_values("select indexname::text from pg_indexes where tablename = '#{table_name}' and indexdef ilike '%gin%'")
index_names = ApplicationRecord.connection.select_values("select indexname::text from pg_indexes where tablename = '#{table_name}' and indexdef ilike '%using gin%'")
 
index_names.each do |index_name|
ActiveRecord::Base.connection.execute("select gin_clean_pending_list('#{index_name}')")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment