Re: Covering GiST indexes

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Covering GiST indexes
Date: 2018-04-12 12:03:50
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Interesting work. I don't have a time now to learn deep your patch, so, add it
to next commitfest, pls. First of all I'd like to see more tests in patch, not

Andrey Borodin wrote:
> Hi, hackers!
> Looks like we finally have covering indexes! And that's cool!
> So I decided to create a thread to discuss covering GiST indexes.
> Here's a prototype patch implementing this functionality.
> It is quite small (+80 -30) and lacks tests and docs. But it creates a context.
> I have two concerns.
> First one is about INDEX_AM_RESERVED_BIT.
> B-tree uses it as a base for prefix truncation (I'm not quite sure why it is usually called suffix truncation, but this is a matter for other thread).
> GiST , probably, will not use [pre\su]fix truncation. But I'd like to use that 13th bit to implement intra-page indexing - a way to improve search within gist page. See [0,1]
> Second, currently including indexes do not allow same attributes in both keys and include parts.
> # create index on x using gist(c) include (c);
> ERROR: included columns must not intersect with key columns
> But it makes sense for example for geometries like PostGIS. Index keys are truncated to small MBRs while having whole complex geometry right in an index could be handy.
> Any feedback will be appreciated.
> Best regards, Andrey Borodin.
> [0]
> [1]

Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2018-04-12 12:11:25 Re: Covering GiST indexes
Previous Message Craig Ringer 2018-04-12 12:03:31 Re: psql leaks memory on query cancellation