Split of an internal node works like this:
1. Gather all the existing tuples on the page, plus the new tuple being
inserted.
2. Call picksplit on the tuples, to divide them into pages
3. Go through all tuples on the buffer associated with the page, and
divide them into buffers on the new pages. This is done by calling
penalty function on each buffered tuple.
I wonder if it would be better for index quality to pass the buffered
tuples to picksplit in the 2nd step, so that they too can affect the
split decision. Maybe it doesn't make much difference in practice..
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com