mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03: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
@ -820,18 +820,14 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty,
|
|||||||
|
|
||||||
penalty = _bt_split_penalty(state, state->splits + i);
|
penalty = _bt_split_penalty(state, state->splits + i);
|
||||||
|
|
||||||
if (penalty <= perfectpenalty)
|
|
||||||
{
|
|
||||||
bestpenalty = penalty;
|
|
||||||
lowsplit = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (penalty < bestpenalty)
|
if (penalty < bestpenalty)
|
||||||
{
|
{
|
||||||
bestpenalty = penalty;
|
bestpenalty = penalty;
|
||||||
lowsplit = i;
|
lowsplit = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (penalty <= perfectpenalty)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
final = &state->splits[lowsplit];
|
final = &state->splits[lowsplit];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user