postgresql/src
Peter Geoghegan 9dc718bdf2 Pass down "logically unchanged index" hint.
Add an executor aminsert() hint mechanism that informs index AMs that
the incoming index tuple (the tuple that accompanies the hint) is not
being inserted by execution of an SQL statement that logically modifies
any of the index's key columns.

The hint is received by indexes when an UPDATE takes place that does not
apply an optimization like heapam's HOT (though only for indexes where
all key columns are logically unchanged).  Any index tuple that receives
the hint on insert is expected to be a duplicate of at least one
existing older version that is needed for the same logical row.  Related
versions will typically be stored on the same index page, at least
within index AMs that apply the hint.

Recognizing the difference between MVCC version churn duplicates and
true logical row duplicates at the index AM level can help with cleanup
of garbage index tuples.  Cleanup can intelligently target tuples that
are likely to be garbage, without wasting too many cycles on less
promising tuples/pages (index pages with little or no version churn).

This is infrastructure for an upcoming commit that will teach nbtree to
perform bottom-up index deletion.  No index AM actually applies the hint
just yet.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Victor Yegorov <vyegorov@gmail.com>
Discussion: https://postgr.es/m/CAH2-Wz=CEKFa74EScx_hFVshCOn6AA5T-ajFASTdzipdkLTNQQ@mail.gmail.com
2021-01-13 08:11:00 -08:00
..
backend Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
bin pg_dump: label INDEX ATTACH ArchiveEntries with an owner. 2021-01-12 13:37:38 -05:00
common Fix and simplify some code related to cryptohashes 2021-01-08 10:37:03 +09:00
fe_utils Update copyright for 2021 2021-01-02 13:06:25 -05:00
include Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
interfaces Try next host after a "cannot connect now" failure. 2021-01-11 14:12:31 -05:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Fix plpgsql tests for debug_invalidate_system_caches_always. 2021-01-08 18:12:07 -05:00
port Don't use elog() in src/port/pwrite.c. 2021-01-13 19:34:14 +13:00
template On macOS, use -isysroot in link steps as well as compile steps. 2020-11-20 00:07:09 -05:00
test Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
timezone Update copyright for 2021 2021-01-02 13:06:25 -05:00
tools Invent struct ReindexIndexInfo 2021-01-12 17:05:06 -03:00
tutorial Update copyright for 2021 2021-01-02 13:06:25 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Split Makefile symbol CFLAGS_VECTOR into two symbols. 2020-09-06 21:28:16 -04: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