Hacker News new | ask | show | jobs
by shayonj 672 days ago
Reindex starts fresh on a temp index and then does a swap in the end - https://www.postgresql.org/docs/current/sql-reindex.html
1 comments

That's very helpful, but I still don't get the recommendation. The reindex seems to guarantee that any useful index will be used, the deletion and recreation seems to guarantee a period of bad performance as long as an index takes to build even if the old one was fine.

(I.e. I could imagine a customer upgrading from a version that already backported an index to the new major version where it was added and deciding there's a performance regression.)