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

From Peter Geoghegan
Subject Re: WIP: Covering + unique indexes.
Date
Msg-id CAH2-WzkRh4z+ABtSUU1DUOgOOSEm_7zKg=p_AQXii+m84rJgPw@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Covering + unique indexes.  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: WIP: Covering + unique indexes.  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Wed, Apr 18, 2018 at 1:32 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:
>> I don't understand. We do check the number of attributes on rightmost
>> pages, but we do so separately, in the main loop. For every item that
>> isn't the high key.
>
> Comment added, pls, verify. And refactored _bt_check_natts(), I hope, now
> it's a bit more readable.

The new comment looks good.

Now I understand what you meant about _bt_check_natts(). And, I agree
that this is an improvement -- the extra verbosity is worth it.

> I didn't do that in v1, sorry, I was unclear. Attached patch contains all
> changes suggested in my previous email.

Looks new BTreeTupSetNAtts () assertion good to me.

I suggest committing this patch as-is.

Thank you
-- 
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: WIP: Covering + unique indexes.
Next
From: Tom Lane
Date:
Subject: Re: Truncation failure in autovacuum results in data corruption (duplicate keys)