# Repairing damaged post\_search\_data (unable to create database dumps and execute search reindex)

**URL:** <https://meta.discourse.org/t/repairing-damaged-post-search-data-unable-to-create-database-dumps-and-execute-search-reindex/57046>\
**Category:** Self-hosting\
**Created:** [2월 7, 2017, 9:08오전 UTC](https://meta.discourse.org/t/repairing-damaged-post-search-data-unable-to-create-database-dumps-and-execute-search-reindex/57046 "2017-02-07T09:08:42Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![skriesch](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@skriesch](https://meta.discourse.org/u/skriesch)\
**Post date:** [2월 13, 2017, 2:12오후 UTC](https://meta.discourse.org/t/repairing-damaged-post-search-data-unable-to-create-database-dumps-and-execute-search-reindex/57046/10 "2017-02-13T14:12:53Z")

</div>

```
postgres@xxx:~$ for ((i=0; i<13467; i++ )); do psql discourse -c "SELECT * FROM posts LIMIT 1 offset $i" >/dev/null || echo $i; done
ERROR: missing chunk number 0 for toast value 69836 in pg_toast_16766
1806
ERROR: unexpected chunk number 1 (expected 0) for toast value 69776 in pg_toast_16766
2725
ERROR: missing chunk number 0 for toast value 69797 in pg_toast_16766
2772
ERROR: missing chunk number 0 for toast value 69832 in pg_toast_16766
3032
ERROR: unexpected chunk number 1 (expected 0) for toast value 69853 in pg_toast_16766
3492
discourse=# select id from posts limit 1 offset 1806;
  id  
------
 5987
(1 row)

discourse=# select id from posts limit 1 offset 2725;
  id  
------
 5978
(1 row)

discourse=# select id from posts limit 1 offset 2772;
  id  
------
 5982
(1 row)

discourse=# select id from posts limit 1 offset 3032;
  id  
------
 5986
(1 row)

discourse=# select id from posts limit 1 offset 3492;
  id  
------
 5990
(1 row)

discourse=# delete from posts where id in (5987, 5978, 5982, 5986, 5990);
DELETE 5
discourse=# VACUUM FULL posts;
VACUUM

```

---

_[View the full topic](https://meta.discourse.org/t/repairing-damaged-post-search-data-unable-to-create-database-dumps-and-execute-search-reindex/57046)._
