Skipping Inserts

Started by Anthony Mallgren2 months ago4 messagesgeneral
Jump to latest
#1Anthony Mallgren
abmallgren@gmail.com

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"

[warn] skipped a 3-word n-gram: table tid from new index tuple (2524,130)
cannot find insert offset between offsets 2 and 16 of block 36 in index
"congress_103_3_word_word1_idx"

Any idea?

Anthony B. Mallgren
https://mallgren.wordpress.com/ <https://mallgren.me>

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Anthony Mallgren (#1)
Re: Skipping Inserts

Anthony Mallgren <abmallgren@gmail.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

#3Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Anthony Mallgren (#1)
Re: Skipping Inserts

On Mon, 2026-09-21 at 17:30 -0400, Anthony Mallgren wrote:

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"
    [warn] skipped a 3-word n-gram: table tid from new index tuple (2524,130) cannot find insert offset between offsets 2 and 16 of block 36 in index "congress_103_3_word_word1_idx"

Any idea?

That doesn't look like PostgreSQL.
Please ask the authors of whatever extension you are using.

Yours,
Laurenz Albe

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Anthony Mallgren (#1)
Re: Skipping Inserts

On 9/21/26 2:30 PM, Anthony Mallgren wrote:

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"

[warn] skipped a 3-word n-gram: table tid from new index tuple
(2524,130) cannot find insert offset between offsets 2 and 16 of block
36 in index "congress_103_3_word_word1_idx"

Any idea?

This is going to need more information:

1) Postgres version and whether it is community or fork.

2) Any extensions being used.

3) The actual query being used.

Anthony B. Mallgren
https://mallgren.wordpress.com/ <https://mallgren.me>

--
Adrian Klaver
adrian.klaver@aklaver.com