Re: BUG #17268: Possible corruption in toast index after reindex index concurrently - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Date
Msg-id 20211108175113.tojy5hvxws7gjrhp@alap3.anarazel.de
Whole thread Raw
In response to Re: BUG #17268: Possible corruption in toast index after reindex index concurrently  (Maxim Boguk <maxim.boguk@gmail.com>)
List 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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17275: pg_waldump files split across postgresql14 and postgresql14-server packages
Next
From: Andres Freund
Date:
Subject: Re: BUG #17268: Possible corruption in toast index after reindex index concurrently