Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Tom Lane
Erik Johnston writes: > We've also now found that the index on the backup does in fact point to > those ctids after all, but they are marked as dead. So at some point > between then and when we inserted the new row at that ctid today those > entries were marked undead. I wonder if this behavior c

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Erik Johnston
On Fri, 4 Jul 2025, 15:38 Ron Johnson, wrote: > On Fri, Jul 4, 2025 at 9:49 AM Erik Johnston 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 >> ma

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Ron Johnson
On Fri, Jul 4, 2025 at 9:49 AM Erik Johnston 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 t

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Erik Johnston
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 ext

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread shammat
Ron Johnson schrieb am 04.07.2025 um 12:05: > On Fri, Jul 4, 2025 at 5:50 AM mailto:sham...@gmx.net>> > wrote: > > > One coincidence is that we started seeing the first symptoms of this > > around the same time as libicu was updated with a security patch. > > However, postgres hasn’t

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread Ron Johnson
On Fri, Jul 4, 2025 at 5:50 AM wrote: > > One coincidence is that we started seeing the first symptoms of this > > around the same time as libicu was updated with a security patch. > > However, postgres hasn’t been restarted and doesn’t reference the > > new version in its process maps. Plus stat

Re: Corrupt btree index includes rows that don't match

2025-07-04 Thread shammat
> One coincidence is that we started seeing the first symptoms of this > around the same time as libicu was updated with a security patch. > However, postgres hasn’t been restarted and doesn’t reference the > new version in its process maps. Plus state groups are integers > anyway. We also use the

Corrupt btree index includes rows that don't match

2025-07-04 Thread Erik Johnston
Hello, We're looking into a problem with our application and have tracked it down to index corruption, whereby we have many index rows pointing to the wrong tuples in the heap. Our table looks like: ``` Table "matrix.state_groups_state" Column| Type | Collation | Nullable |