require-concurrent-index-deletion
#
problemA normal DROP INDEX
acquires an ACCESS EXCLUSIVE
lock on the table, blocking other accesses until the index drop can be completed.
#
solutionEnsure all index deletions use the CONCURRENTLY
option. CONCURRENTLY
waits until conflicting transactions have completed.
https://www.postgresql.org/docs/10/sql-dropindex.html
#
drop indexInstead of:
Use:
#
solution for alembic and sqlalchemyInstead of:
Use: