0

first of all, I assure you, I have googled for hours now. My main problem is that I'm trying to fix a corrupted database of the tool paperless-ngx that I'm using. I am an IT admin but I have no experience with SQL whatsoever.

I'm getting this error:

ERROR:  missing chunk number 0 for toast value 52399 in pg_toast_2619

Now every guide on the entire internet (I'm gonna post this one for reference) on how to fix this tells me to REINDEX the table.

When I do this using

reindex (verbose) table django_q_task;

it keeps waiting indefinitely with this errormessage:

WARNING:  concurrent insert in progress within table "django_q_task"

I am positive that there is no write happening from paperless side, all containers except for the database container have been stopped. I tried locking the table using

lock table django_q_task in exclusive mode nowait;

but the error persists. I'm at the end of my wits. I beg of you, can someone provide me with detailed instructions for someone with no postgresql experience at all?

  • I think you have more corruption than can be fixed by a reindex. The reindex has already acquired the lock it needs. Which is why it is complaining about a situation that shouldn't be able to happen. But this should not lead to an infinite loop or an infinite hang. Is this message just shown once, or repeatedly? – jjanes Jul 20 '22 at 20:34
  • Hi, thanks for the answer! WARNING: concurrent insert in progress within table "django_q_task" appears once and then it does absolutely nothing. (as it seems, I mean, verbose should show me SOMETHING as output, shouldn't it? – Schlitzruessler Jul 22 '22 at 06:58
  • I just restored from a full-backup of my paperless-instance from two weeks ago. Works fine now. I am sorry for whoever finds this in the future with the same problem! – Schlitzruessler Jul 22 '22 at 16:35

0 Answers0