mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Don't include unused space in LOG_NEWPAGE records.
This is the same trick we use when taking a full page image of a buffer passed to XLogInsert.
This commit is contained in:
@@ -222,7 +222,7 @@ btbuildempty(PG_FUNCTION_ARGS)
|
||||
(char *) metapage, true);
|
||||
if (XLogIsNeeded())
|
||||
log_newpage(&index->rd_smgr->smgr_rnode.node, INIT_FORKNUM,
|
||||
BTREE_METAPAGE, metapage);
|
||||
BTREE_METAPAGE, metapage, false);
|
||||
|
||||
/*
|
||||
* An immediate sync is require even if we xlog'd the page, because the
|
||||
|
@@ -274,7 +274,7 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
|
||||
if (wstate->btws_use_wal)
|
||||
{
|
||||
/* We use the heap NEWPAGE record type for this */
|
||||
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page);
|
||||
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user