Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index. - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.
Date
Msg-id 4BBFF6D5-58EE-40B3-A770-9BA2F46A1C69@enterprisedb.com
Whole thread Raw
In response to Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.
List pgsql-hackers

> On May 17, 2024, at 1:00 PM, Peter Geoghegan <pg@bowt.ie> wrote:
>
> Many different parts of the B-Tree code will fight against allowing
> duplicates of the same value to span multiple leaf pages -- this is
> especially true for unique indexes.

The quick-and-dirty TAP test I wrote this morning is intended to introduce duplicates across page boundaries, not to
testfor ones that got there by normal database activity.  In other words, the TAP test forcibly corrupts the index by
changinga value on one side of a boundary to be equal to the value on the other side of the boundary.  Prior to the
corruptingaction the values were all unique. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Streaming read-ready sequential scan code
Next
From: Peter Geoghegan
Date:
Subject: Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.