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

From Teodor Sigaev
Subject Re: WIP: Covering + unique indexes.
Date
Msg-id ae741241-211f-ba79-affb-3a391016e5d6@sigaev.ru
Whole thread Raw
In response to Re: WIP: Covering + unique indexes.  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: WIP: Covering + unique indexes.
List pgsql-hackers
> 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.

>> 4) BTreeTupSetNAtts - seems, it's better to add check  of nattrs to fits  to
>> BT_N_KEYS_OFFSET_MASK  mask, and it should not touch BT_RESERVED_OFFSET_MASK
>> bits, now it will overwrite that bits.
> 
> An assertion sounds like it would be an improvement, though I don't
> see that in the patch you posted.
I didn't do that in v1, sorry, I was unclear. Attached patch contains 
all changes suggested in my previous email.

-- 
Teodor Sigaev                      E-mail: teodor@sigaev.ru
                                       WWW: http://www.sigaev.ru/

Attachment

pgsql-hackers by date:

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