From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Indexes with INCLUDE columns and their support in B-tree
Date: Sun, 08 Apr 2018 17:27:19 -0400
Message-ID: <324.1523222839@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfduWrysrT-qAhn+3Ea5+Mg6Vhc-oA6o2Z-hRCPRdvf3tiw@mail.gmail.com>
References: <E1f4u1Z-0004VE-IS@gemulon.postgresql.org>
<26445.1523198494@sss.pgh.pa.us>
<CAPpHfdtRbE+mX9P5CYUQku=ogeVEW98SDSdiBq=4T4d36D-S_Q@mail.gmail.com>
<95278363-d49f-a5e3-106f-d92fac547e19@sigaev.ru>
<CAPpHfduWrysrT-qAhn+3Ea5+Mg6Vhc-oA6o2Z-hRCPRdvf3tiw@mail.gmail.com>
Alexander Korotkov <a.korotkov@postgrespro.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. 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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.korotkov@postgrespro.ru, teodor@sigaev.ru
Subject: Re: pgsql: Indexes with INCLUDE columns and their support in B-tree
In-Reply-To: <324.1523222839@sss.pgh.pa.us>
References: <E1f4u1Z-0004VE-IS@gemulon.postgresql.org> <26445.1523198494@sss.pgh.pa.us> <CAPpHfdtRbE+mX9P5CYUQku=ogeVEW98SDSdiBq=4T4d36D-S_Q@mail.gmail.com> <95278363-d49f-a5e3-106f-d92fac547e19@sigaev.ru> <CAPpHfduWrysrT-qAhn+3Ea5+Mg6Vhc-oA6o2Z-hRCPRdvf3tiw@mail.gmail.com> <324.1523222839@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox