public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Corrupt btree index includes rows that don't match
Date: Fri, 4 Jul 2025 10:38:31 -0400
Message-ID: <CANzqJaAW2kwAyeJzboUCsbCpCk9ERDF1aZrW9OEa+DSqpPQxjA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAPo1J60Vcu+5G0EvvAZtYgTn6U6ADij3aVJ8WFVz77jP+Bd_Tw@mail.gmail.com>
	<[email protected]>

On Fri, Jul 4, 2025 at 9:49 AM Erik Johnston <[email protected]> wrote:

> Hi, a quick update:
>
> - We have discovered that the corruption was present from before libicu
> update.
> - We ran `pg_amcheck --index state_groups_state_type_idx --heapallindexed
> matrix`, which returned nothing
> - We believe that means that (and matches what we see sampling) the index
> has gained extra entries, i.e. that for a given state group it does return
> all the relevant rows in the table *plus* extra rows.
>
> We are also seeing old state groups starting to point at rows that have
> only just been inserted. For example, querying for 353864583 on the primary
> it returns that row plus four rows that have been inserted today, but on
> the backup from last week an index only scan for 353864583 only returns one
> row. This makes it feel like the corruption is ongoing? Nothing should have
> modified that state group in the interim (they are generally immutable).
>
> This naively feels like when inserting a new row we sometimes add the row
> to the index twice: once pointing from the correct state group to the new
> row, and once from an old state group to the new row?
>
>
Are checksums enabled in the instance?

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Corrupt btree index includes rows that don't match
  In-Reply-To: <CANzqJaAW2kwAyeJzboUCsbCpCk9ERDF1aZrW9OEa+DSqpPQxjA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox