Hi,
i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf.
And i found the following code:
the routine _bt_page_recyclable say maybe the page is all-zero page, if so
then the code run (BTPageOpaque) PageGetSpecialPointer(page); it will be failed because
it access invalid memory.
I don't know whether it is so. Look forward t your reply, thanks.
if (_bt_page_recyclable(page))
{
/*
* If we are generating WAL for Hot Standby then create a
* WAL record that will allow us to conflict with queries
* running on standby.
*/
if (XLogStandbyInfoActive() && RelationNeedsWAL(rel))
{
BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page); /* if page is all-zero, this will failed */
_bt_log_reuse_page(rel, blkno, opaque->btpo.xact);
}
/* Okay to use page. Re-initialize and return it */
_bt_pageinit(page, BufferGetPageSize(buf));
return buf;
}