Enhance postgres index filter with values from real life
This has been found on fairly old instances of ours (cwo/elo). Dunno if we
really want this in, it may lead to false negatives.
--- a/cubicweb/server/checkintegrity.py Wed Dec 14 17:04:29 2016 +0100
+++ b/cubicweb/server/checkintegrity.py Wed Dec 14 17:06:24 2016 +0100
@@ -481,7 +481,8 @@
if source.dbdriver == 'postgres':
def index_filter(idx):
- return not (idx.startswith('pg_') or idx.endswith('_pkey'))
+ return not (idx.startswith('pg_') or '_pkey' in idx or '_p_key' in idx
+ or idx.endswith('_key'))
else:
def index_filter(idx):