mirror of
https://github.com/postgres/postgres.git
synced 2025-12-18 05:01:01 +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:
@@ -9130,9 +9130,13 @@ copy_relation_data(SMgrRelation src, SMgrRelation dst,
|
||||
src->smgr_rnode.backend,
|
||||
forkNum))));
|
||||
|
||||
/* XLOG stuff */
|
||||
/*
|
||||
* WAL-log the copied page. Unfortunately we don't know what kind of
|
||||
* a page this is, so we have to log the full page including any
|
||||
* unused space.
|
||||
*/
|
||||
if (use_wal)
|
||||
log_newpage(&dst->smgr_rnode.node, forkNum, blkno, page);
|
||||
log_newpage(&dst->smgr_rnode.node, forkNum, blkno, page, false);
|
||||
|
||||
PageSetChecksumInplace(page, blkno);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user