Pain point · Data export & migration · Blocks work
Migrations cannot create indexes concurrently because they run in a transaction
1 source thread · first seen 2019-09
Summary
CREATE INDEX CONCURRENTLY cannot run inside a transaction, and Hasura wraps migrations in one, leaving no escape hatch beyond running SQL outside migration tracking.
- Affects
- teams running migrations on production databases
- Workaround
- Run the statement directly on the database, outside migrations
Evidence
Excerpts are copied word for word from the source; follow the link to read it in full.
“But this parameter cannot be used in migrations because Hasura runs the migration in a transaction when applying”