amcheck: Optimize speed of checking for unique constraint violation
Alexander Korotkov <akorotkov@postgresql.org>
amcheck: Optimize speed of checking for unique constraint violation Currently, when amcheck validates a unique constraint, it visits the heap for each index tuple. This commit implements skipping keys, which have only one non-dedeuplicated index tuple (quite common case for unique indexes). That gives substantial economy on index checking time. Reported-by: Noah Misch Discussion: https://postgr.es/m/20240325020323.fd.nmisch%40google.com Author: Alexander Korotkov, Pavel Borisov
Files
| Path | Change | +/− |
|---|---|---|
| contrib/amcheck/verify_nbtree.c | modified | +33 −3 |
Discussion
- [PATCH] Improve amcheck to also check UNIQUE constraint in btree index. 86 messages · 2021-02-08 → 2024-07-26