diff options
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/tablecmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/vacuumlazy.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 1aa1ad91277..1d9f29a7b7c 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -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); 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, |