postgresql/src
Peter Eisentraut bbaf315309 Add bound check before bsearch() for performance
In the current lazy vacuum implementation, some index AMs such as
btree indexes call lazy_tid_reaped() for each index tuple during
ambulkdelete to check if the index tuple points to the (collected)
garbage tuple.  In that function, we simply call bsearch(), but we
should be able to know the result without bsearch() if the index tuple
points to the heap tuple that is out of range of the collected garbage
tuples.  Therefore, add a simple bound check before resorting to
bsearch().  Testing has shown that this can give significant
performance benefits.

Author: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+fd4k76j8jKzJzcx8UqEugvayaMSnQz0iLUt_XgBp-_-bd22A@mail.gmail.com
2021-03-10 15:19:37 +01:00
..
backend Add bound check before bsearch() for performance 2021-03-10 15:19:37 +01:00
bin Fix another portability bug in recent pgbench commit. 2021-03-10 23:20:41 +13:00
common pg_upgrade: Check version of target cluster binaries 2021-03-03 09:45:56 +01:00
fe_utils Generalize parallel slot result handling. 2021-02-05 16:08:45 -05:00
include Fix another portability bug in recent pgbench commit. 2021-03-10 23:20:41 +13:00
interfaces Revert changes for SSL compression in libpq 2021-03-10 09:35:42 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Remove extra increment of plpgsql's statement counter for FOR loops. 2021-02-02 14:35:12 -05:00
port Add missing pthread_barrier_t. 2021-03-10 17:44:04 +13:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Move tablespace path re-creation from the makefiles to pg_regress 2021-03-10 14:50:00 +09:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Move tablespace path re-creation from the makefiles to pg_regress 2021-03-10 14:50:00 +09:00
tutorial Doc, more or less: uncomment tutorial example that was fixed long ago. 2021-01-13 16:00:03 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00