Skip to content

Commit f0ca378

Browse files
Slightly simplify nbtree split point choice loop.
Spotted during post-commit review of the nbtree deduplication commit (commit 0d861bb).
1 parent 8f4ee44 commit f0ca378

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/backend/access/nbtree/nbtsplitloc.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -820,18 +820,14 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty,
820820

821821
penalty = _bt_split_penalty(state, state->splits + i);
822822

823-
if (penalty <= perfectpenalty)
824-
{
825-
bestpenalty = penalty;
826-
lowsplit = i;
827-
break;
828-
}
829-
830823
if (penalty < bestpenalty)
831824
{
832825
bestpenalty = penalty;
833826
lowsplit = i;
834827
}
828+
829+
if (penalty <= perfectpenalty)
830+
break;
835831
}
836832

837833
final = &state->splits[lowsplit];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy