# "EXCEPTION: psql failed: DETAIL: Key (post\_id)=(36946) is duplicated."

**URL:** <https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356>\
**Category:** Self-hosting\
**Created:** [June 18, 2022, 5:24am UTC](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356 "2022-06-18T05:24:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 18, 2022, 10:49pm UTC](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356/2 "2022-06-18T22:49:51Z")

</div>

It sounds like you have a corrupt index. What version of postgres is this?

There are a few topics about this. You can try to reindex that table on the running instance and then delete or fix the duplicate IDs.

---

_[View the full topic](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356)._
