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

@@ -67,7 +67,7 @@ class PostgresqlAnalyser(BaseAnalyser):
fn=has_create_index_in_transaction,
message="CREATE INDEX prolongs transaction, delaying lock release",
mode=CheckMode.TRANSACTION,
type=CheckType.ERROR,
type=CheckType.WARNING,
),
Check(
code="DROP_INDEX",