*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.150 2007/02/08 05:05:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.151 2007/02/08 13:52:55 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
xlrec.rightsib = BufferGetBlockNumber(rbuf);
xlrec.firstright = firstright;
xlrec.rnext = ropaque->btpo_next;
- xlrec.level = lopaque->btpo.level;
+ xlrec.level = ropaque->btpo.level;
rdata[0].data = (char *) &xlrec;
rdata[0].len = SizeOfBtreeSplit;
lastrdata = &rdata[0];
/* Log downlink on non-leaf pages. */
- if (lopaque->btpo.level > 0)
+ if (ropaque->btpo.level > 0)
{
lastrdata->next = lastrdata + 1;
lastrdata++;
recptr = XLogInsert(RM_BTREE_ID, xlinfo, rdata);
- PageSetLSN(leftpage, recptr);
- PageSetTLI(leftpage, ThisTimeLineID);
+ PageSetLSN(origpage, recptr);
+ PageSetTLI(origpage, ThisTimeLineID);
PageSetLSN(rightpage, recptr);
PageSetTLI(rightpage, ThisTimeLineID);
if (!P_RIGHTMOST(ropaque))