Re: [ADMIN] Help: unfixable/undead error - missing chunk number 0 fortoast value 413511 in pg_toast_25477 - Mailing list pgsql-admin

From Jorge Torralba
Subject Re: [ADMIN] Help: unfixable/undead error - missing chunk number 0 fortoast value 413511 in pg_toast_25477
Date
Msg-id CACut7uR8ohqdDkn-343SZbBwu-stXRLeZf051dgyrQVaFidQ+g@mail.gmail.com
Whole thread Raw
In response to [ADMIN] Help: unfixable/undead error - missing chunk number 0 for toastvalue 413511 in pg_toast_25477  (Maris Jansons <maris@lailio.net>)
Responses Re: [ADMIN] Help: unfixable/undead error - missing chunk number 0for toast value 413511 in pg_toast_25477  (Maris Jansons <maris@lailio.net>)
List pgsql-admin
I have run this with success several times.  I modified it to be intuitive. There may be a typo or two but have a look at this:

DO $f$

DECLARE

    baddata TEXT;

    badid INT;

BEGIN

FOR badid IN SELECT id FROM badtable LOOP

    BEGIN

        SELECT badcolumn

        INTO columndata

        FROM badtable where id = badid;

    EXCEPTION

        WHEN OTHERS THEN

            RAISE NOTICE 'Data for ID % is corrupt', badid;

            CONTINUE;

    END;

END LOOP;

END;

$f$




On Wed, Jan 25, 2017 at 1:30 PM, Maris Jansons <maris@lailio.net> wrote:
Hello,
> A couple things you can try.
> 1. reindex your toast table.
> 2. write a loop that ..

I already have done both, did not help, check the original message for details.

Best Regards,
Maris.




--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential information. If you are not the intended recipient, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this email in error and delete the copy you received. Thank You.

pgsql-admin by date:

Previous
From: Maris Jansons
Date:
Subject: Re: [ADMIN] Help: unfixable/undead error - missing chunk number 0for toast value 413511 in pg_toast_25477
Next
From: Maris Jansons
Date:
Subject: Re: [ADMIN] Help: unfixable/undead error - missing chunk number 0for toast value 413511 in pg_toast_25477