From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Indexes with INCLUDE columns and their support in B-tree |
Date: | 2018-04-08 21:37:25 |
Message-ID: | CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Mon, Apr 9, 2018 at 12:27 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> writes:
> > There is also patch for valgrind error in CheckIndexCompatible().
> > It appears that this function didn't initialize ii_NumIndexAttrs and
> > ii_NumIndexKeyAttrs before calling ComputeIndexAttrs(). This
> > variables weren't used before, but now they're used to determine
> > whether index column is key. Also, this patch makes ComputeIndexAttrs()
> > initialize classOidP elements with InvalidOid for non-key attributes.
>
> You didn't test this quite enough, because when I tried it I got a batch
> of warnings about memory chunk inconsistencies. The reason was that
> DefineIndex only allocated a classObjectId array large enough for the
> key columns, so that the change in ComputeIndexAttrs made it write past
> the end of that array.
Sorry, my bad.
But I think it's a good idea to make those output
> arrays all the same length, so I kept that change and changed DefineIndex.
>
> Pushed; I've not checked to see if this makes valgrind happy, but
> the buildfarm will tell us.
>
Thank you!
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-04-08 21:54:31 | Re: pgsql: Support partition pruning at execution time |
Previous Message | Tom Lane | 2018-04-08 21:27:19 | Re: pgsql: Indexes with INCLUDE columns and their support in B-tree |