Downgrade CREATE_INDEX_EXCLUSIVE to a warning

While it's always a dangerous *pattern* to create an index while a
transaction is open & holds an exclusive lock, in practice it's not
always a big deal (for example, indexing a table with very few rows can
be fast). Accordingly, downgrade to a warning.
This commit is contained in:
David Cain authored and David Wobrock committed 2023-07-09 14:42:35 +02:00
1 parent 0c5519d9dc
commit 48fac8856b
4 files changed
+14 -6

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ You can ignore checks through the `--exclude-migration-tests` option by specifyi
| `RUNPYTHON_MODEL_VARIABLE_NAME` | The model variable name is different from the model class itself | Warning |
| `RUNSQL_REVERSIBLE` | RunSQL data migration is not reversible (missing reverse SQL) | Warning |
| `CREATE_INDEX` | (Postgresql specific) Creating an index without the concurrent keyword will lock the table and may generate downtime | Warning |
| `CREATE_INDEX_EXCLUSIVE` | (Postgresql specific) Creating an index in a transaction (after an `EXCLUSIVE` lock) prolongs the exclusive lock | Error |
| `CREATE_INDEX_EXCLUSIVE` | (Postgresql specific) Creating an index in a transaction (after an `EXCLUSIVE` lock) prolongs the exclusive lock | Warning |
| `DROP_INDEX` | (Postgresql specific) Dropping an index without the concurrent keyword will lock the table and may generate downtime | Warning |
| `REINDEX` | (Postgresql specific) Reindexing will lock the table and may generate downtime | Warning |