Re: nbtsort.c performs unneeded (though harmless) truncation

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: nbtsort.c performs unneeded (though harmless) truncation
Date: 2018-05-04 09:39:15
Message-ID: f6ce0eb8-ac14-2ef3-4b16-6c7143f9599b@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you, pushed.

Peter Geoghegan wrote:
> I noticed that we're calling _bt_nonkey_truncate() needlessly when a
> minimum key is needed at the leftmost page on each level of the tree.
> This was always a special case, and I think that it should remain as
> one. Attached patch avoids unneeded truncations, while preserving the
> generic BTreeTupleGetNAtts() assertions.
>
> This isn't a correctness issue, and the extra overhead of unneeded
> truncation should be negligible, but what we have now seems confusing
> to me.
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Sitnikov 2018-05-04 10:31:50 Re: GSoC 2018: thrift encoding format
Previous Message Marina Polyakova 2018-05-04 09:32:23 Re: [HACKERS] path toward faster partition pruning