Re: WIP: Covering + unique indexes.

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP: Covering + unique indexes.
Date: 2018-04-18 20:32:07
Message-ID: ae741241-211f-ba79-affb-3a391016e5d6@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Attachment Content-Type Size
0001-Adjust-INCLUDE-index-truncation-comments-and-code-v3.patch text/x-patch 56.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-04-18 20:45:00 Re: WIP: Covering + unique indexes.
Previous Message Tom Lane 2018-04-18 20:09:10 Re: Truncation failure in autovacuum results in data corruption (duplicate keys)