Re: Intermittent missing chunk ERRORS

From: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
To: Sbob <sbob(at)quadratum-braccas(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Intermittent missing chunk ERRORS
Date: 2025-04-26 20:12:14
Message-ID: CAM+6J96GFJ4+N6=ptmPn_KcOjBtJbRbs5xb4_dwToSbiBwOA3g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

forgot about the core tool to check for the problem.

https://www.postgresql.org/docs/current/amcheck.html

this can help find corruption issues much faster.

Thanks,
Vijay

Open to work
Resume - Vijaykumar Jain <https://github.com/cabecada>

On Sun, Apr 27, 2025, 1:34 AM Vijaykumar Jain <
vijaykumarjain(dot)github(at)gmail(dot)com> wrote:

> a lot in this gist is something you can debug to start with.
>
> https://gist.github.com/supix/80f9a6111dc954cf38ee99b9dedf187a
>
> if not the index than the toast table might be corrupt.
> the bigger problem might be to figure out how it got corrupt. a one off
> power incident, or bug or storage is having issues etc.
> once that is clear,
> a simple start would be to run a pg_dump of the database to /dev/null and
> check if the dump is clean without errors.
>
> Thanks,
> Vijay
>
> Open to work
> Resume - Vijaykumar Jain <https://github.com/cabecada>
>
> On Sat, Apr 26, 2025, 10:39 PM Sbob <sbob(at)quadratum-braccas(dot)com> wrote:
>
>> All;
>>
>>
>> I am working with a client, they have an app that is running into error's
>> like this:
>>
>>
>> *SQL Error [XX001]: ERROR: missing chunk number 0 for toast value
>> 44915477 in pg_toast_5321896 *
>>
>>
>> I thought it was a corruption / REINDEX issue, however I have run
>> REINDEXon the index, REINDEX on the table and even a reindexdb on the
>> database. Today they passed me another error (the one above) and once I was
>> able to login I ran the same query the app team referenced and it ran
>> without any errors. I asked them to re-run the query and they informed me
>> that it now works for them as well.
>>
>>
>> I assume that if this were a corrupt index issue then the query would
>> continue to fail every time.
>>
>> Has anyone seen this type of intermittent index error before? and
>> thoughts on where to look /how to debug this?
>>
>>
>> Thanks in advance
>>
>>
>>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2025-04-26 20:24:58 Re: Intermittent missing chunk ERRORS
Previous Message Vijaykumar Jain 2025-04-26 20:04:37 Re: Intermittent missing chunk ERRORS