Skip to content

MG25 — REINDEX without CONCURRENTLY locks the index for the rebuild

Group: Migration safety · Auto-fixable: no

REINDEX without CONCURRENTLY locks the index against writes for the whole rebuild. Use REINDEX … CONCURRENTLY (Postgres 12+).

bad: REINDEX INDEX idx;
good: REINDEX INDEX CONCURRENTLY idx;

Disable this rule in banshee.toml:

[lint]
exclude = ["MG25"]

Or silence one line with -- noqa: MG25. See Linting.