pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
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: Mon, 9 Apr 2018 00:37:25 +0300
Message-ID: <CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com> (raw)
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>

On Mon, Apr 9, 2018 at 12:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> 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.


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

view thread (11+ messages)

Message-ID: <CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com>
Permalink:  ../CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com

 · 

reply

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: a.korotkov@postgrespro.ru, tgl@sss.pgh.pa.us, teodor@sigaev.ru
  Subject: Re: pgsql: Indexes with INCLUDE columns and their support in B-tree
  In-Reply-To: <CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@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> <324.1523222839@sss.pgh.pa.us> <CAPpHfduvL8Lc1a-BYM0qh4nYfpZSdk6Sd4DPknJOqroajq1MYw@mail.gmail.com>

* 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