At Thu, 14 Mar 2019 14:32:49 +0100, Dmitry Dolgov <9erthali...@gmail.com> wrote in <CA+q6zcUSuFBhGVFZN_AVSxRbt5wr_4_YEYwv8PcQB=m6j6z...@mail.gmail.com> > > On Tue, Mar 5, 2019 at 4:05 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > > Although there are still some rough edges, e.g. going forth, back and forth > > again leads to a sutiation, when `_bt_first` is not applied anymore and the > > first element is wrongly skipped. I'll try to fix it with the next version > > of > > patch. > > It turns out that `_bt_skip` was unnecessary applied every time when scan was > restarted from the beginning. Here is the fixed version of patch.
> nbtsearch.c: In function ‘_bt_skip’: > nbtsearch.c:1292:11: error: ‘struct IndexScanDescData’ has no member named > ‘xs_ctup’; did you mean ‘xs_itup’? > scan->xs_ctup.t_self = currItem->heapTid; Unfortunately a recent commit c2fe139c20 hit this. Date: Mon Mar 11 12:46:41 2019 -0700 > Index scans now store the result of a search in > IndexScanDesc->xs_heaptid, rather than xs_ctup->t_self. As the > target is not generally a HeapTuple anymore that seems cleaner. regards. -- Kyotaro Horiguchi NTT Open Source Software Center