Re: pgsql: Allow HOT updates for some expression indexes

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Allow HOT updates for some expression indexes
Date: 2018-03-27 19:11:31
Message-ID: CANP8+jLd4USe=yuN77NVQOyijO9Wn4DFNt+iLr74sBVuCSBnsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Buildfarm failure seen, investigating

On 27 March 2018 at 20:01, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> 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(-)
>

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2018-03-27 19:19:48 Re: pgsql: Allow HOT updates for some expression indexes
Previous Message Simon Riggs 2018-03-27 19:01:33 pgsql: Allow HOT updates for some expression indexes