mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +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:
@@ -699,14 +699,10 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
|
||||
* which will cause a PANIC. To prevent that, check whether
|
||||
* the page has been previously WAL-logged, and if not, do that
|
||||
* now.
|
||||
*
|
||||
* XXX: It would be nice to use a logging method supporting
|
||||
* standard buffers here since log_newpage_buffer() will write
|
||||
* the full block instead of omitting the hole.
|
||||
*/
|
||||
if (RelationNeedsWAL(onerel) &&
|
||||
PageGetLSN(page) == InvalidXLogRecPtr)
|
||||
log_newpage_buffer(buf);
|
||||
log_newpage_buffer(buf, true);
|
||||
|
||||
PageSetAllVisible(page);
|
||||
visibilitymap_set(onerel, blkno, buf, InvalidXLogRecPtr,
|
||||
|
Reference in New Issue
Block a user