Detaching a partition requires requires an access exclusive lock that can be avoided by passing in `concurrently`. https://www.postgresql.org/docs/current/ddl-partitioning.html https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DETACH-PARTITION