Add index on search vector column for catalog resource table
What does this MR do and why?
Resolves the index addition on #433153 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Migrations
UP
main: == [advisory_lock_connection] object_id: 184020, pg_backend_pid: 53190
main: == 20231222051050 AddSearchVectorIndexToCatalogResources: migrating ===========
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0007s
main: -- execute(" CREATE INDEX CONCURRENTLY IF NOT EXISTS index_catalog_resources_on_search_vector ON catalog_resources \n USING GIN (search_vector);\n")
main: -> 0.0060s
main: -- execute("RESET statement_timeout")
main: -> 0.0002s
main: == 20231222051050 AddSearchVectorIndexToCatalogResources: migrated (0.0146s) ==
main: == [advisory_lock_connection] object_id: 184020, pg_backend_pid: 53190
ci: == [advisory_lock_connection] object_id: 184220, pg_backend_pid: 53192
ci: == 20231222051050 AddSearchVectorIndexToCatalogResources: migrating ===========
ci: -- execute("SET statement_timeout TO 0")
ci: -> 0.0002s
ci: -- execute(" CREATE INDEX CONCURRENTLY IF NOT EXISTS index_catalog_resources_on_search_vector ON catalog_resources \n USING GIN (search_vector);\n")
ci: -> 0.0069s
ci: -- execute("RESET statement_timeout")
ci: -> 0.0003s
ci: == 20231222051050 AddSearchVectorIndexToCatalogResources: migrated (0.0144s) ==
ci: == [advisory_lock_connection] object_id: 184220, pg_backend_pid: 53192
DOWN
main: == [advisory_lock_connection] object_id: 182200, pg_backend_pid: 53923
main: == 20231222051050 AddSearchVectorIndexToCatalogResources: reverting ===========
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main: -> 0.1088s
main: -- indexes(:catalog_resources)
main: -> 0.0023s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0001s
main: -- remove_index(:catalog_resources, {:algorithm=>:concurrently, :name=>"index_catalog_resources_on_search_vector"})
main: -> 0.0019s
main: -- execute("RESET statement_timeout")
main: -> 0.0001s
main: == 20231222051050 AddSearchVectorIndexToCatalogResources: reverted (0.1244s) ==
main: == [advisory_lock_connection] object_id: 182200, pg_backend_pid: 53923
How to set up and validate locally
- Nothing to verify here as it is just a migration for creating an index.
Related to #433153 (closed)
Edited by Rajendra Kadam