On Thu, Oct 1, 2026 at 4:16 PM Zhijie Hou <[email protected]> wrote: > > Hi, > > On Thu, Oct 1, 2026 at 2:39 PM Nisha Moond <[email protected]> wrote: > > > > Attached updated patches v5. There are a couple of optimizations and > > comment improvements in 002(testcode) too. > > Thanks for the patch. It looks good to me overall, I just have coding > suggestions: > > 1. > > Relation idxrel = index_open(idxoid, AccessShareLock); > > We shall use NoLock here, since the index must have been locked already. >
Makes sense, the index is always already locked when we get here. I
also added a comment.
>
> 2.
>
> + for (int i = 0; i < idxrel->rd_index->indnkeyatts; i++)
> + {
> + AttrNumber attnum = idxrel->rd_index->indkey.values[i];
> +
> + Assert(AttributeNumberIsValid(attnum));
> + indexbitmap = bms_add_member(indexbitmap,
> + attnum - FirstLowInvalidHeapAttributeNumber);
> + }
>
> This Assert also looks unnecessary, removing it would make the code more
> concise:
>
> for (int i = 0; i < idxrel->rd_index->indnkeyatts; i++)
> indexbitmap = bms_add_member(indexbitmap,
> idxrel->rd_index->indkey.values[i] -
> FirstLowInvalidHeapAttributeNumber);
>
Done.
--
Thanks,
Nisha
v6-0001-Use-the-relation-map-s-index-when-searching-delet.patch
Description: Binary data
v6-0002-Add-TAP-tests-for-update_deleted-detection-by-seq.patch
Description: Binary data
