considerations are rather different. REINDEX locks out writes
but not reads of the index's parent table. It also takes an
ACCESS EXCLUSIVE lock on the specific index being processed,
- which will block reads that attempt to use that index. In contrast,
+ which will block reads that attempt to use that index. In particular,
+ the query planner tries to take an ACCESS SHARE
+ lock on every index of the table, regardless of the query, and so
+ REINDEX blocks virtually any queries except for some
+ prepared queries whose plan has been cached and which don't use this very
+ index. In contrast,
DROP INDEX momentarily takes an
ACCESS EXCLUSIVE lock on the parent table, blocking both
writes and reads. The subsequent CREATE INDEX locks out