Don't truncate away non-key attributes for leftmost downlinks.

Teodor Sigaev <teodor@sigaev.ru>

Commit: 2a9e04f0a8ada12d4af4f095e4dbe164e2983bce
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2018-05-04T09:38:23Z
Releases: 11.0
Don't truncate away non-key attributes for leftmost downlinks.

nbtsort.c does not need to truncate away non-key attributes for the
minimum key of the leftmost page on a level, since this is only used to
build a minus infinity downlink for the level's leftmost page.
Truncating away non-key attributes in advance of truncating away all
attributes in _bt_sortaddtup() does not affect the correctness of CREATE
INDEX, but it is misleading.

Author: Peter Geoghegan
Discussion: https://www.postgresql.org/message-id/CAH2-WzkAS2M3ussHG-s_Av=Zo6dPjOxyu5fNRkYnxQV+YzGQ4w@mail.gmail.com

Files

PathChange+/−
src/backend/access/nbtree/nbtsort.c modified +14 −16

Discussion