Re: BUG #17268: Possible corruption in toast index after reindex index concurrently

From: Andres Freund <andres(at)anarazel(dot)de>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Alexey Ermakov <alexey(dot)ermakov(at)dataegret(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Date: 2021-11-08 17:51:13
Message-ID: 20211108175113.tojy5hvxws7gjrhp@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2021-11-04 20:07:28 +0200, Maxim Boguk wrote:
> ERROR: heap tuple (59561917,1) from table "pg_toast_2624976286" lacks
> matching index tuple within index "pg_toast_2624976286_index"
> HINT: Retrying verification using the function
> bt_index_parent_check() might provide a more specific error.

Could you use https://www.postgresql.org/docs/devel/pageinspect.html
to get the heap items for this page? Best after verifying that that ctid still
shows an amcheck error. Something like

SELECT * FROM page_header(get_raw_page('pg_toast_2624976286', 59561917));
SELECT lp, lp_off, lp_flags, lp_len, t_xmin, t_xmax, t_field3, t_ctid, t_infomask2, t_infomask, mask.raw_flags, mask.combined_flags, t_hoff, t_bits
FROM heap_page_items(get_raw_page('pg_toast_2624976286', 59561917)),
heap_tuple_infomask_flags(t_infomask, t_infomask2) AS mask;

Do you have WAL archiving or such set up? If you still have the WAL from that
time it'd be helpful.

Greetings,

Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2021-11-08 18:08:33 Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Previous Message Dmitry Dolgov 2021-11-08 17:28:52 Re: BUG #17255: Server crashes in index_delete_sort_cmp() due to race condition with vacuum