From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow HOT updates for some expression indexes
Date: Tue, 27 Mar 2018 19:01:33 +0000
Message-ID: <E1f0tqf-0007Vs-JZ@gemulon.postgresql.org> (raw)
Allow HOT updates for some expression indexes
If the value of an index expression is unchanged after UPDATE,
allow HOT updates where previously we disallowed them, giving
a significant performance boost in those cases.
Particularly useful for indexes such as JSON->>field where the
JSON value changes but the indexed value does not.
Submitted as "surjective indexes" patch, now enabled by use
of new "recheck_on_update" parameter.
Author: Konstantin Knizhnik
Reviewer: Simon Riggs, with much wordsmithing and some cleanup
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c203d6cf81b4d7e43edb2b75ec1b741ba48e04e0
Modified Files
--------------
doc/src/sgml/ref/create_index.sgml | 37 +++++++++-
src/backend/access/common/reloptions.c | 45 ++++++++++++-
src/backend/access/heap/heapam.c | 105 +++++++++++++++++++++++++++--
src/backend/catalog/index.c | 3 +-
src/backend/utils/cache/relcache.c | 112 +++++++++++++++++++++++++++++--
src/bin/psql/tab-complete.c | 4 +-
src/include/access/reloptions.h | 2 +
src/include/utils/rel.h | 12 +++-
src/include/utils/relcache.h | 3 +-
src/test/regress/expected/func_index.out | 61 +++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/func_index.sql | 30 +++++++++
13 files changed, 395 insertions(+), 22 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: simon@2ndQuadrant.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow HOT updates for some expression indexes
In-Reply-To: <E1f0tqf-0007Vs-JZ@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