Skip to content

A platform for community discussion. Free, open, simple.

PERF: Drop index idx_regular_post_search_data concurrently

Sam Saffron54cf3c67664a
diff --git a/db/post_migrate/20200818084329_update_private_message_on_post_search_data.rb b/db/post_migrate/20200818084329_update_private_message_on_post_search_data.rb
index 6c45b3d0395..225a4a4cb1e 100644
--- a/db/post_migrate/20200818084329_update_private_message_on_post_search_data.rb
+++ b/db/post_migrate/20200818084329_update_private_message_on_post_search_data.rb
@@ -38,7 +38,7 @@ class UpdatePrivateMessageOnPostSearchData < ActiveRecord::Migration[6.0]
# must drop index cause we do not want an enormous amount of work done
# as we are changing data
execute <<~SQL
- DROP INDEX IF EXISTS idx_regular_post_search_data
+ DROP INDEX CONCURRENTLY IF EXISTS idx_regular_post_search_data
SQL
# Delete post_search_data of orphaned posts