diff options
Diffstat (limited to 'src/backend/access/rmgrdesc/heapdesc.c')
| -rw-r--r-- | src/backend/access/rmgrdesc/heapdesc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c index c8a61669dd..7df18fa2d2 100644 --- a/src/backend/access/rmgrdesc/heapdesc.c +++ b/src/backend/access/rmgrdesc/heapdesc.c @@ -41,16 +41,17 @@ out_infobits(StringInfo buf, uint8 infobits) } void -heap_desc(StringInfo buf, uint8 xl_info, char *rec) +heap_desc(StringInfo buf, XLogRecord *record) { - uint8 info = xl_info & ~XLR_INFO_MASK; + char *rec = XLogRecGetData(record); + uint8 info = record->xl_info & ~XLR_INFO_MASK; info &= XLOG_HEAP_OPMASK; if (info == XLOG_HEAP_INSERT) { xl_heap_insert *xlrec = (xl_heap_insert *) rec; - if (xl_info & XLOG_HEAP_INIT_PAGE) + if (record->xl_info & XLOG_HEAP_INIT_PAGE) appendStringInfoString(buf, "insert(init): "); else appendStringInfoString(buf, "insert: "); @@ -69,7 +70,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec) { xl_heap_update *xlrec = (xl_heap_update *) rec; - if (xl_info & XLOG_HEAP_INIT_PAGE) + if (record->xl_info & XLOG_HEAP_INIT_PAGE) appendStringInfoString(buf, "update(init): "); else appendStringInfoString(buf, "update: "); @@ -85,7 +86,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec) { xl_heap_update *xlrec = (xl_heap_update *) rec; - if (xl_info & XLOG_HEAP_INIT_PAGE) /* can this case happen? */ + if (record->xl_info & XLOG_HEAP_INIT_PAGE) /* can this case happen? */ appendStringInfoString(buf, "hot_update(init): "); else appendStringInfoString(buf, "hot_update: "); @@ -126,9 +127,10 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec) appendStringInfoString(buf, "UNKNOWN"); } void -heap2_desc(StringInfo buf, uint8 xl_info, char *rec) +heap2_desc(StringInfo buf, XLogRecord *record) { - uint8 info = xl_info & ~XLR_INFO_MASK; + char *rec = XLogRecGetData(record); + uint8 info = record->xl_info & ~XLR_INFO_MASK; info &= XLOG_HEAP_OPMASK; if (info == XLOG_HEAP2_CLEAN) @@ -172,7 +174,7 @@ heap2_desc(StringInfo buf, uint8 xl_info, char *rec) { xl_heap_multi_insert *xlrec = (xl_heap_multi_insert *) rec; - if (xl_info & XLOG_HEAP_INIT_PAGE) + if (record->xl_info & XLOG_HEAP_INIT_PAGE) appendStringInfoString(buf, "multi-insert (init): "); else appendStringInfoString(buf, "multi-insert: "); |
