summaryrefslogtreecommitdiff
path: root/src/backend/commands/vacuumlazy.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-12-04 00:10:47 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-12-04 00:10:47 +0200
commit9e857436ef7dff8fb8a0bf43cfe62650e2be6be9 (patch)
treee365d1848d19c0ff9180d7a1fa05ba978aae486a /src/backend/commands/vacuumlazy.c
parent22122c83f1331d03e8317afbfcfbb65bef9c82d2 (diff)
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.
Diffstat (limited to 'src/backend/commands/vacuumlazy.c')
-rw-r--r--src/backend/commands/vacuumlazy.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index fe2d9e78fa8..d346772600c 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -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,