mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
pg_visibility: Add pg_truncate_visibility_map function.
This requires some core changes as well so that we can properly WAL-log the truncation. Specifically, it changes the format of the XLOG_SMGR_TRUNCATE WAL record, so bump XLOG_PAGE_MAGIC. Patch by me, reviewed but not fully endorsed by Andres Freund.
This commit is contained in:
@@ -37,7 +37,8 @@ smgr_desc(StringInfo buf, XLogReaderState *record)
|
||||
xl_smgr_truncate *xlrec = (xl_smgr_truncate *) rec;
|
||||
char *path = relpathperm(xlrec->rnode, MAIN_FORKNUM);
|
||||
|
||||
appendStringInfo(buf, "%s to %u blocks", path, xlrec->blkno);
|
||||
appendStringInfo(buf, "%s to %u blocks flags %d", path,
|
||||
xlrec->blkno, xlrec->flags);
|
||||
pfree(path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user