From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: amcheck: Optimize speed of checking for unique constraint violat
Date: Sun, 28 Jul 2024 11:04:14 +0000
Message-ID: <E1sY1hG-001aoc-JI@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cdd6ab9d1f5396ec1097d51c21a224aa41118c9c
Modified Files
--------------
contrib/amcheck/verify_nbtree.c | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
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: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: amcheck: Optimize speed of checking for unique constraint violat
In-Reply-To: <E1sY1hG-001aoc-JI@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox