Skip to content

require-concurrent-index-drop

Drop indexes concurrently.

Severity: warning · Lock: ACCESS EXCLUSIVE

Dropping an index is quick, but a plain DROP INDEX needs an ACCESS EXCLUSIVE lock on the table. If a long query holds the table, the drop waits, and every query after it queues behind the drop.

DROP INDEX idx_users_email;
DROP INDEX CONCURRENTLY idx_users_email;

To skip this rule for one statement, put -- pgdeadbolt-ignore require-concurrent-index-drop on the line above it.