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

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: 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-04 18:17:58
Message-ID: CAH2-Wz=Sk=5WCt1T+7cReAuDoggJkiNxeCD73ODm6jfrLu4y1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Nov 4, 2021 at 11:08 AM Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> wrote:
> select bt_index_check('pg_toast.pg_toast_2624976286_index', true);
> DEBUG: verifying consistency of tree structure for index
> "pg_toast_2624976286_index"
> DEBUG: verifying level 3 (true root level)
> DEBUG: verifying level 2
> DEBUG: verifying level 1
> DEBUG: verifying level 0 (leaf level)
> DEBUG: leaf block 715360 of index "pg_toast_2624976286_index" has no
> first data item
> DEBUG: verifying that tuples from index "pg_toast_2624976286_index"
> are present in "pg_toast_2624976286"
> 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.

That's an unusually large TOAST table. It's at least ~454.42GiB, based
on this error. Is the block number 59561917 near the end of the table?

Structural verification of the B-Tree itself doesn't throw any errors
here. This leaves little doubt that the problem is that the index is
missing entries that it really should have. That's not really new
information, though -- I was pretty sure of that much already.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Maxim Boguk 2021-11-04 19:47:20 Re: BUG #17268: Possible corruption in toast index after reindex index concurrently
Previous Message Maxim Boguk 2021-11-04 18:07:28 Re: BUG #17268: Possible corruption in toast index after reindex index concurrently