Concurrent db table indexing through alembic script
alembic, database, postgresql-9.1, python, sqlalchemy
Solution
Alembic supports `PostgreSQL` concurrently indexes creation
def upgrade():
op.execute('COMMIT')
op.create_index('ix_1', 't1', ['col1'], postgresql_concurrently=True)
Problem
Is it possible to create concurrent indexes for DB table through alembic script? I'm using postgres DB, and able to create concurrent table indexes through sql command on postgres prompt.(create index concurrently on ();) But couldn't find way to create same through Db migration(alembic) script. If we create normal index(not concurrent) , it'll lock DB table so can't perform any query in parallel. So just want to know how to create concurrent index through alembic(DB migration) script