postgresql/src/include
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
..
access Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
bootstrap Update copyright for 2021 2021-01-02 13:06:25 -05:00
catalog Fix function prototypes in dependency.h. 2021-01-12 11:01:08 +13:00
commands Report progress of COPY commands 2021-01-06 21:51:06 +01:00
common Fix and simplify some code related to cryptohashes 2021-01-08 10:37:03 +09:00
datatype Update copyright for 2021 2021-01-02 13:06:25 -05:00
executor Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
fe_utils Update copyright for 2021 2021-01-02 13:06:25 -05:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Update copyright for 2021 2021-01-02 13:06:25 -05:00
lib Update copyright for 2021 2021-01-02 13:06:25 -05:00
libpq Update copyright for 2021 2021-01-02 13:06:25 -05:00
mb Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Re-implement pl/pgsql's expression and assignment parsing. 2021-01-04 11:52:00 -05:00
optimizer Update copyright for 2021 2021-01-02 13:06:25 -05:00
parser Re-implement pl/pgsql's expression and assignment parsing. 2021-01-04 11:52:00 -05:00
partitioning Update copyright for 2021 2021-01-02 13:06:25 -05:00
port Provide pg_preadv() and pg_pwritev(). 2021-01-11 15:24:38 +13:00
portability Update copyright for 2021 2021-01-02 13:06:25 -05:00
postmaster Update copyright for 2021 2021-01-02 13:06:25 -05:00
regex Update copyright for 2021 2021-01-02 13:06:25 -05:00
replication Allow decoding at prepare time in ReorderBuffer. 2021-01-04 08:34:50 +05:30
rewrite Update copyright for 2021 2021-01-02 13:06:25 -05:00
snowball Update copyright for 2021 2021-01-02 13:06:25 -05:00
statistics Update copyright for 2021 2021-01-02 13:06:25 -05:00
storage Log long wait time on recovery conflict when it's resolved. 2021-01-13 22:59:17 +09:00
tcop Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsearch Update copyright for 2021 2021-01-02 13:06:25 -05:00
utils Add idle_session_timeout. 2021-01-06 18:28:52 -05:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
c.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
fmgr.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
funcapi.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
getaddrinfo.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
getopt_long.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
miscadmin.h Add idle_session_timeout. 2021-01-06 18:28:52 -05:00
pg_config.h.in Provide pg_preadv() and pg_pwritev(). 2021-01-11 15:24:38 +13:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Replace CLOBBER_CACHE_ALWAYS with run-time GUC 2021-01-06 10:46:44 +01:00
pg_getopt.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_trace.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgstat.h Report progress of COPY commands 2021-01-06 21:51:06 +01:00
pgtar.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgtime.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
port.h Provide pg_preadv() and pg_pwritev(). 2021-01-11 15:24:38 +13:00
postgres.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
rusagestub.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
windowapi.h Update copyright for 2021 2021-01-02 13:06:25 -05:00