Checking for problems¶
get_mv_problems() scans all registered views and reports any issues it finds:
To check a specific problem code:
To suppress a problem code you do not care about:
Finding unregistered materialised views:
-- Show MVs that exist in the database but are not registered with pg_auto_mv
SELECT mv_schema, mv_name, is_populated
FROM pgauto_mv.list_mv(p_status => 'missing');
Finding registrations whose view was dropped:
If someone dropped a materialised view without calling unregister_mv(), the registration becomes stale:
Clean up stale registrations: