MG30 — DETACH PARTITION without CONCURRENTLY holds an exclusive lock
Group: Migration safety · Auto-fixable: no
ALTER TABLE … DETACH PARTITION without CONCURRENTLY takes an exclusive lock on the parent table for the whole operation. Use DETACH PARTITION … CONCURRENTLY (Postgres 14+).
Example
Section titled “Example”bad: ALTER TABLE t DETACH PARTITION p;good: ALTER TABLE t DETACH PARTITION p CONCURRENTLY;Configure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["MG30"]Or silence one line with -- noqa: MG30. See Linting.