Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> Tom Lane wrote:
>>> In fsm_rebuild_page, surely we needn't check "if (lchild < NodesPerPage)".
>
>> Yes, we do.
>
> But the loop starting point is such that you must be visiting a parent
> with at least one child, no?
Hmm, true, and that means that the comment above it is wrong. I'll
change the code to do what the comment says. That way, if the page is
completely garbled, and a parent node with no children has a value other
than zero, that gets fixed too.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com