Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> ppage = BufferGetPage(pbuf);
> pop = (BTPageOpaque) PageGetSpecialPointer(ppage);
> max = PageGetMaxOffsetNumber(pop);
I believe you want PageGetMaxOffsetNumber(ppage) ...
regards, tom lane