Skip to content

Instantly share code, notes, and snippets.

@Capncavedan
Created March 27, 2018 16:06
Show Gist options
  • Save Capncavedan/34cb8938ee1e2ec5e6cd0f7b02b51db5 to your computer and use it in GitHub Desktop.
Save Capncavedan/34cb8938ee1e2ec5e6cd0f7b02b51db5 to your computer and use it in GitHub Desktop.
Find corrupt/invalid Postgresql indexes
SELECT pg_class.relname
FROM pg_class, pg_index
WHERE pg_index.indisvalid = false
AND pg_index.indexrelid = pg_class.oid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment