Replace XLR_RMGR_INFO_MASK with XLOG_HEAP_OPMASK

This commit is contained in:
Konstantin Knizhnik
2021-07-09 15:14:50 +03:00
parent baf8800b96
commit 97681acfcf

View File

@@ -731,7 +731,7 @@ pub fn decode_wal_record(record: Bytes) -> DecodedWALRecord {
// 5. Handle a few special record types that modify blocks without registering
// them with the standard mechanism.
if xlogrec.xl_rmid == pg_constants::RM_HEAP_ID {
let info = xlogrec.xl_info & pg_constants::XLR_RMGR_INFO_MASK;
let info = xlogrec.xl_info & pg_constants::XLOG_HEAP_OPMASK;
let blkno = blocks[0].blkno / pg_constants::HEAPBLOCKS_PER_PAGE as u32;
if info == pg_constants::XLOG_HEAP_INSERT {
let xlrec = XlHeapInsert::decode(&mut buf);
@@ -785,7 +785,7 @@ pub fn decode_wal_record(record: Bytes) -> DecodedWALRecord {
}
}
} else if xlogrec.xl_rmid == pg_constants::RM_HEAP2_ID {
let info = xlogrec.xl_info & pg_constants::XLR_RMGR_INFO_MASK;
let info = xlogrec.xl_info & pg_constants::XLOG_HEAP_OPMASK;
if info == pg_constants::XLOG_HEAP2_MULTI_INSERT {
let xlrec = XlHeapMultiInsert::decode(&mut buf);
if (xlrec.flags