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.
This commit is contained in:
Sam Saffron 2020-08-20 13:39:46 +10:00
parent 628319aad3
commit 54cf3c6766
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -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