diff options
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 2059bbeda4a..8e712b793f3 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8545,7 +8545,8 @@ xlog_redo(XLogReaderState *record) XLogRecPtr lsn = record->EndRecPtr; /* in XLOG rmgr, backup blocks are only used by XLOG_FPI records */ - Assert(!XLogRecHasAnyBlockRefs(record) || info == XLOG_FPI); + Assert(info == XLOG_FPI || info == XLOG_FPI_FOR_HINT || + !XLogRecHasAnyBlockRefs(record)); if (info == XLOG_NEXTOID) { @@ -8730,7 +8731,7 @@ xlog_redo(XLogReaderState *record) { /* nothing to do here */ } - else if (info == XLOG_FPI) + else if (info == XLOG_FPI || info == XLOG_FPI_FOR_HINT) { Buffer buffer; @@ -8739,12 +8740,15 @@ xlog_redo(XLogReaderState *record) * block. The block reference must include a full-page image - * otherwise there would be no point in this record. * - * Since the only change in these backup block are hint bits, there - * are no recovery conflicts generated. + * No recovery conflicts are generated by these generic records - if a + * resource manager needs to generate conflicts, it has to define a + * separate WAL record type and redo routine. * - * This also means there is no corresponding API call for this, so an - * smgr implementation has no need to implement anything. Which means - * nothing is needed in md.c etc + * XLOG_FPI_FOR_HINT records are generated when a page needs to be + * WAL- logged because of a hint bit update. They are only generated + * when checksums are enabled. There is no difference in handling + * XLOG_FPI and XLOG_FPI_FOR_HINT records, they use a different info + * code just to distinguish them for statistics purposes. */ if (XLogReadBufferForRedo(record, 0, &buffer) != BLK_RESTORED) elog(ERROR, "unexpected XLogReadBufferForRedo result when restoring backup block"); |