# "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:** 6

<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 20, 2022, 2:18pm UTC](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356/6 "2022-06-20T14:18:11Z")

</div>

I think it’s something like

```plaintext
./launcher enter app
su - postges
psql discourse
select id from post_search_data were post_id>86918 and post_id<86921;
--- when you get the id ----
delete from post_search_data where id=ID_FROM_LAST_QUERY

```

There could be more.

Perhaps someone else can provide more help but that’s about all I think I can do without being logged in to your server. If you need much more help, you can post in #Marketplace or contact me directly.

Or perhaps it’s safe to just wipe it away and have it get regenerated, but I’m not quite sure about that.

---

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