Re: Index Skip Scan (new UniqueKeys)

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Floris Van Nee <florisvannee(at)optiver(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Index Skip Scan (new UniqueKeys)
Date: 2020-08-15 14:12:40
Message-ID: 20200815141240.wuyc6ijkmnywywtn@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mon, Jul 27, 2020 at 12:24:31PM +0200, Dmitry Dolgov wrote:
>
> I see, thanks for clarification. You're right, in this part of
> implementation there is no way to give up if LSN changes like
> _bt_killitems does. As far as I can see the leaf page is already pinned
> all the time between reading relevant tuples and comparing them, I only
> need to handle posting list tuples.

Here is a new version that hopefully address most of the concerns
mentioned in this thread so far. As before, first two patches are taken
from UniqueKeys thread and attached only for the reference. List of
changes includes:

* fix for index scan not being fully covered
* rebase on the latest UniqueKey patch
* taking into account posting tuples (although I must say I couldn't
produce a test that will hit this part, so I would appreciate if
someone can take a look)
* fixes suggested by Floris with adjustments as discussed in the thread

There are no changes related to EquivalenceClasses vs expressions, which
would probably be my next target. Having this in mind I must admit I'm
not super excited about possibility of including another patch as a
dependency without clear prospects and plans for it.

Thanks for the feedback folks!

Attachment Content-Type Size
v36-0001-Introduce-RelOptInfo-notnullattrs-attribute.patch text/x-diff 4.8 KB
v36-0002-Introduce-UniqueKey-attributes-on-RelOptInfo-str.patch text/x-diff 58.6 KB
v36-0003-Extend-UniqueKeys.patch text/x-diff 13.0 KB
v36-0004-Index-skip-scan.patch text/x-diff 44.6 KB
v36-0005-Btree-implementation-of-skipping.patch text/x-diff 43.5 KB
v36-0006-Index-skip-scan-documentation.patch text/x-diff 4.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-08-15 14:23:55 Re: use pg_get_functiondef() in pg_dump
Previous Message Peter Eisentraut 2020-08-15 11:47:41 Re: run pgindent on a regular basis / scripted manner