I found that _bt_split function calls PageGetTempPage, but next call is
_bt_page_init which clear all contents anyway. Is there any reason to call
PageGetTempPage instead of palloc?
Original code:
00796 leftpage = PageGetTempPage(origpage, sizeof(BTPageOpaqueData));
00797 rightpage = BufferGetPage(rbuf);
00798
00799 _bt_pageinit(leftpage, BufferGetPageSize(buf));
Suggested code:
00796 leftpage = palloc(PageGetSize(origpage));
00797 rightpage = BufferGetPage(rbuf);
00798
00799 _bt_pageinit(leftpage, BufferGetPageSize(buf));
Any idea?
thanks Zdenek
--
Zdenek Kotala Sun Microsystems
Prague, Czech Republic http://sun.com/postgresql