-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
Description
Hi,
Currently, we skip the pg_toast% schema in the invalid index detection service.
One of our customers performs REINDEX SCHEMA maintenance, which rebuilds toast indexes.
As a result, the service missed several invalid indexes in their database.
SELECT current_database(), nsp.nspname AS schemaname, cls.relname, idx.indisvalid
FROM pg_class cls
join pg_namespace nsp on nsp.oid = cls.relnamespace
join pg_index idx on idx.indexrelid = cls.oid
WHERE
cls.relkind = 'i'
AND nsp.nspname not like 'pg_toast%'
AND nsp.nspname NOT IN ('information_schema', 'pg_catalog');
};Can we remove the toast filter?
check_pgactivity/check_pgactivity
Line 4781 in a8ccfee
| SELECT current_database(), nsp.nspname AS schemaname, cls.relname, idx.indisvalid |