Re: WIP: Covering + unique indexes. - Mailing list pgsql-hackers

From David Rowley
Subject Re: WIP: Covering + unique indexes.
Date
Msg-id CAKJS1f8LDmtPuYmn5jigsPAqPcGD0EwxkVB-HG5-Nsw-vJhbUg@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Covering + unique indexes.  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: WIP: Covering + unique indexes.  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
List pgsql-hackers
On 13 January 2016 at 06:47, Jeff Janes <jeff.janes@gmail.com> wrote:

Why is omit_opclass a separate patch?  If the included columns now
never participate in the index ordering, shouldn't it be an inherent
property of the main patch that you can "cover" things without btree
opclasses?


I also wondered this. We can't have covering indexes without fixing the problem with the following arrays:

  info->indexkeys = (int *) palloc(sizeof(int) * ncolumns);
  info->indexcollations = (Oid *) palloc(sizeof(Oid) * ncolumns);
  info->opfamily = (Oid *) palloc(sizeof(Oid) * ncolumns);

These need to be sized according to the number of key columns, not the total number of columns. Of course, the TODO item in the patch states this too.

I don't personally think the covering_unique_4.0.patch is that close to being too big to review, I think things would make more sense of the omit_opclass_4.0.patch was included together with this.

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: WIP: Covering + unique indexes.
Next
From: Peter Eisentraut
Date:
Subject: Re: Some bugs in psql_complete of psql