From 54cf3c67664a3eccf2e08710474a100a489d3380 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 20 Aug 2020 13:39:46 +1000 Subject: [PATCH] PERF: Drop index idx_regular_post_search_data concurrently This can slightly help with the drop command. That said if a giant vacuum is running we may still time out. --- ...20200818084329_update_private_message_on_post_search_data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6c45b3d039..225a4a4cb1 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