Re: Skipping Inserts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anthony Mallgren <abmallgren(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Skipping Inserts
Date: 2026-09-22 16:16:45
Message-ID: 1186122.1790093805@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Anthony Mallgren <abmallgren(at)gmail(dot)com> writes:
> I'm getting a lot of messages like this:
> [warn] skipped a 3-word n-gram: table tid from new index tuple (2524,87)
> cannot find insert offset between offsets 2 and 16 of block 36 in index
> "congress_103_3_word_word1_idx"

I don't know about the first part of that, maybe it's from your
application? But the "table tid ..." part matches this:

/*
* postingoff should never be set more than once per leaf page
* binary search. That would mean that there are duplicate table
* TIDs in the index, which is never okay. Check for that here.
*/
if (insertstate->postingoff != 0)
ereport(ERROR,
(errcode(ERRCODE_INDEX_CORRUPTED),
errmsg_internal("table tid from new index tuple (%u,%u) cannot find insert offset between offsets %u and %u of block %u in index \"%s\"",
ItemPointerGetBlockNumber(key->scantid),
ItemPointerGetOffsetNumber(key->scantid),
low, stricthigh,
BufferGetBlockNumber(insertstate->buf),
RelationGetRelationName(rel))));

So this code thinks your index is corrupt. REINDEX should help.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2026-09-22 16:17:52 Re: Skipping Inserts
Previous Message Anthony Mallgren 2026-09-21 21:30:25 Skipping Inserts