"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> This is right after a for-loop, which exits when i = maxoff + 1. So the
> first if-statement could be written as "if (newitemoff > maxoff)". If
> that's true, newitemonleft shouldn't be true, because that would mean
> that we've split a page so that all items went to the left page, and the
> right page is empty.
No, it would mean that we split the page in such a way that only the new
item is going to the right page. Probably not hard to duplicate if you
use near-maximal-sized keys.
regards, tom lane