postgresql/src/backend/catalog
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
..
.gitignore Remove separate files for the initial contents of pg_(sh)description 2020-01-19 13:54:58 +02:00
Catalog.pm Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Update copyright for 2021 2021-01-02 13:06:25 -05:00
aclchk.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
catalog.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
dependency.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
genbki.pl Update copyright for 2021 2021-01-02 13:06:25 -05:00
heap.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
index.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
indexing.c Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
information_schema.sql Update copyright for 2021 2021-01-02 13:06:25 -05:00
namespace.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
objectaccess.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
objectaddress.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
partition.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_aggregate.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_cast.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_collation.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_constraint.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_conversion.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_db_role_setting.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_depend.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_enum.c Rename "enum blacklist" to "uncommitted enums". 2021-01-05 12:38:48 +13:00
pg_inherits.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_largeobject.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_namespace.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_operator.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_proc.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_publication.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_range.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_shdepend.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_subscription.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_type.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
sql_feature_packages.txt Cleanup in SQL features files 2020-03-28 08:46:18 +01:00
sql_features.txt Remove undocumented IS [NOT] OF syntax. 2020-11-19 17:39:39 -05:00
storage.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
system_views.sql Report progress of COPY commands 2021-01-06 21:51:06 +01:00
toasting.c Update copyright for 2021 2021-01-02 13:06:25 -05:00