Re: ERROR: posting list tuple with 20 items cannot be split at offset 168

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Herman verschooten <Herman(at)verschooten(dot)net>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Christl Nagels <christel(dot)nagels(at)tranna(dot)be>
Subject: Re: ERROR: posting list tuple with 20 items cannot be split at offset 168
Date: 2021-10-25 11:41:59
Message-ID: 20211025114159.tfeirihcojzzcxed@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Mon, Oct 25, 2021 at 11:58:48AM +0200, Herman verschooten wrote:
> Hi,
>
> I upgraded postgres 13 to 14+231.pgdg18.04+1 during the weekend, virtual ubuntu 20.04.3.
>
> this morning a user reported an error when trying to change a flag in our web app (Phoenix, ecto).
> I traced it back to an index issue on a boolean column.

Hi,

thanks for reporting the issue.

> tranman_production=# update freights set cmr_received=false where id=49632;
> ERROR: XX000: posting list tuple with 20 items cannot be split at offset 168
> LOCATION: _bt_swap_posting, nbtdedup.c:1037
>
> If I drop the index index_freights_on_cmr_received, then the update succeeds.
>
> If I recreate the index, the error resurfaces.
>
> Note that it does not happen for every row in the database.

Interesting, during posting list split the postingoff is bigger than the
number of elements in the posting list. Have you tried to run amcheck
[1] on this index? As in the neighbour thread probably heapallindexed is
important, as the index recreation doesn't help. Otherwise, is there a
chance to use pageinspect [2] to take a look at the structure if the
index?

[1]: https://www.postgresql.org/docs/13/amcheck.html
[2]: https://www.postgresql.org/docs/13/pageinspect.html

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-10-25 13:35:17 BUG #17246: Feature request for adoptive indexes
Previous Message Herman verschooten 2021-10-25 09:58:48 ERROR: posting list tuple with 20 items cannot be split at offset 168