Issue
I received a notification about index corruption on Heroku Postgres and have additional questions about this issue.
Resolution
What is index corruption?
Index corruption is an issue that occurs where the data contained in a PostgreSQL index is no longer valid. Indexes can become corrupted due to software bugs or hardware failures. This corruption can lead to invalid results or errors being returned during query execution.
When Heroku detects index corruption on Heroku Postgres, our automation will attempt to remediate the corruption on any valid, non-unique, btree indexes. Heroku Postgres will notify you via email for any index corruption detected.
If you have a corrupted unique index or the automated corruption fix fails, you may need to fix the corruption manually.