Skip to content

Commit

Permalink
Remove unintended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Knizhnik committed Dec 12, 2024
1 parent 1d9925f commit 581c450
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/backend/access/nbtree/nbtsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,7 @@ _bt_read_parent_for_prefetch(IndexScanDesc scan, BlockNumber parent, ScanDirecti
so->next_parent = opaque->btpo_next;
if (so->next_parent == P_NONE)
next_parent_prefetch_index = -1;
else if (!BlockNumberIsValid(so->next_parent))
elog(FATAL, "btpo_next is invalid");

for (i = 0, j = 0; i < n_child; i++)
{
ItemId itemid = PageGetItemId(page, offnum + i);
Expand All @@ -895,9 +894,8 @@ _bt_read_parent_for_prefetch(IndexScanDesc scan, BlockNumber parent, ScanDirecti
so->next_parent = opaque->btpo_prev;
if (so->next_parent == P_NONE)
next_parent_prefetch_index = -1;
else if (!BlockNumberIsValid(so->next_parent))
elog(FATAL, "btpo_prev is invalid");
for (i = 0, j = 0; i < n_child; i++)

for (i = 0, j = 0; i < n_child; i++)
{
ItemId itemid = PageGetItemId(page, offnum + n_child - i - 1);
IndexTuple itup = (IndexTuple) PageGetItem(page, itemid);
Expand Down Expand Up @@ -1472,7 +1470,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
stack = _bt_search(rel, &inskey, &buf, BT_READ, scan->xs_snapshot);

/* Start prefetching for index only scan */
if (so->prefetch_maximum > 0 && stack != NULL && BufferIsValid(buf) && scan->xs_want_itup) /* index only scan */
if (so->prefetch_maximum > 0 && stack != NULL && scan->xs_want_itup) /* index only scan */
{
BlockNumber leaf = BufferGetBlockNumber(buf);

Expand Down

0 comments on commit 581c450

Please sign in to comment.