On Thu, Jul 17, 2025 at 2:26 PM Peter Geoghegan <p...@bowt.ie> wrote: > The loop has an early check for this (for non-itemDead entries) here: > > /* Quickly skip over items never ItemDead-set by btgettuple */ > if (!kitem->itemDead) > continue; > > I really doubt that this matters
I think that this patch isn't too far off being committable. I'll need to think about issues around adding the new kitem->itemDead bitfield. I'm not really worried about _bt_killitems; more so about the routines called by _bt_readpage, which must make sure that the bit is unset every time a TID is saved in so->currPos.items[]. Attached is v3. Not much has changed. We now defensively unset each previously set kitem->itemDead within _bt_killitems. I've also added a pair of macros that represent 0 and 1 values for these kitem->itemDead bits. Thanks -- Peter Geoghegan
v3-0001-Return-TIDs-in-desc-order-during-backwards-scans.patch
Description: Binary data