failure during index creation. This problem should be gone in current
sources, but I just thought I'd commit the 7.0.* patch in case anyone
else needs it.
btisz,
(PageGetPageSize(npage) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) /3 - sizeof(ItemIdData));
- if (pgspc < btisz)
+ while (pgspc < btisz)
{
Buffer obuf = nbuf;
Page opage = npage;
* we aren't locking).
*/
_bt_wrtbuf(index, obuf);
+
+ /*
+ * Recompute pgspc and loop back to check free space again. If
+ * we were forced to split at a bad split point, we might need
+ * to split again.
+ */
+ pgspc = PageGetFreeSpace(npage);
}
/*