nbtree: consistently use minoff variable.
authorPeter Geoghegan <[email protected]>
Mon, 18 Nov 2024 18:35:28 +0000 (13:35 -0500)
committerPeter Geoghegan <[email protected]>
Mon, 18 Nov 2024 18:35:28 +0000 (13:35 -0500)
This was arguably an oversight in commit 29b64d1de7, which moved this
code from nbtutils.c to its nbtsearch.c caller.

src/backend/access/nbtree/nbtsearch.c

index bf2dc9682ecdafc862f0d014d063dbad4638055b..0cd04661366688f4e2dd2b14900129c5a33651e4 100644 (file)
@@ -1810,8 +1810,7 @@ _bt_readpage(IndexScanDesc scan, ScanDirection dir, OffsetNumber offnum,
             */
            if (scan->ignore_killed_tuples && ItemIdIsDead(iid))
            {
-               Assert(offnum >= P_FIRSTDATAKEY(opaque));
-               if (offnum > P_FIRSTDATAKEY(opaque))
+               if (offnum > minoff)
                {
                    offnum = OffsetNumberPrev(offnum);
                    continue;