mirror of
https://github.com/postgres/postgres.git
synced 2026-04-21 06:08:26 -04:00
Slightly simplify nbtree split point choice loop.
Spotted during post-commit review of the nbtree deduplication commit
(commit 0d861bbb).
This commit is contained in:
parent
8f4ee44bcd
commit
f0ca378d4c
1 changed files with 3 additions and 7 deletions
|
|
@ -820,18 +820,14 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty,
|
|||
|
||||
penalty = _bt_split_penalty(state, state->splits + i);
|
||||
|
||||
if (penalty <= perfectpenalty)
|
||||
{
|
||||
bestpenalty = penalty;
|
||||
lowsplit = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (penalty < bestpenalty)
|
||||
{
|
||||
bestpenalty = penalty;
|
||||
lowsplit = i;
|
||||
}
|
||||
|
||||
if (penalty <= perfectpenalty)
|
||||
break;
|
||||
}
|
||||
|
||||
final = &state->splits[lowsplit];
|
||||
|
|
|
|||
Loading…
Reference in a new issue