Corrupt indexes in PG12, how do I fix?

I think those are used while migration from postgres 10 to 12 as I’ve seen these in almost every user whose indexes have had issues. E.g.
https://meta.discourse.org/t/postgresql-12-update/151236/208?u=itsbhanusharma

https://meta.discourse.org/t/postgresql-12-update/151236/237?u=itsbhanusharma

EDIT: comes from postgres itself

The recommended recovery method in such cases is to drop the invalid index and try again to perform REINDEX CONCURRENTLY . The concurrent index created during the processing has a name ending in the suffix ccnew , or ccold if it is an old index definition which we failed to drop. Invalid indexes can be dropped using DROP INDEX , including invalid toast indexes.

4 Likes