Corrupt indexes in PG12, how do I fix?

After running the upgrade to 2.5.0beta5 and following the post-update guidance to reindex the database, I get this:

discourse=# REINDEX SCHEMA CONCURRENTLY public;
ERROR:  could not create unique index "index_plugin_store_rows_on_plugin_name_and_key_ccnew"
DETAIL:  Key (plugin_name, key)=(discourse-data-explorer, q:-10) is duplicated.

I’d rather not experiment with this one… so, how do I safely delete the duplicate?

2 Likes