I'm confused by the code of XLR_RMGR_INFO_MASK and XLR_INFO_MASK.
According to the definition of masks, the high 4 bits are for rmgr.
/* * The high 4 bits in xl_info may be used freely by rmgr. The * XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY bits can be passed by * XLogInsert caller. The rest are set internally by XLogInsert. */ #define XLR_INFO_MASK 0x0F #define XLR_RMGR_INFO_MASK 0xF0
However, in function XLogInsert(), there is code:
/* * The caller can set rmgr bits, XLR_SPECIAL_REL_UPDATE and * XLR_CHECK_CONSISTENCY; the rest are reserved for use by me. */ if ((info & ~(XLR_RMGR_INFO_MASK | XLR_SPECIAL_REL_UPDATE | XLR_CHECK_CONSISTENCY)) != 0) elog(PANIC, "invalid xlog info mask %02X", info);
XLogInsert only allows the rmgr ,XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY