@@ -41,16 +41,17 @@ out_infobits(StringInfo buf, uint8 infobits)
4141}
4242
4343void
44- heap_desc (StringInfo buf , uint8 xl_info , char * rec )
44+ heap_desc (StringInfo buf , XLogRecord * record )
4545{
46- uint8 info = xl_info & ~XLR_INFO_MASK ;
46+ char * rec = XLogRecGetData (record );
47+ uint8 info = record -> xl_info & ~XLR_INFO_MASK ;
4748
4849 info &= XLOG_HEAP_OPMASK ;
4950 if (info == XLOG_HEAP_INSERT )
5051 {
5152 xl_heap_insert * xlrec = (xl_heap_insert * ) rec ;
5253
53- if (xl_info & XLOG_HEAP_INIT_PAGE )
54+ if (record -> xl_info & XLOG_HEAP_INIT_PAGE )
5455 appendStringInfoString (buf , "insert(init): " );
5556 else
5657 appendStringInfoString (buf , "insert: " );
@@ -69,7 +70,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
6970 {
7071 xl_heap_update * xlrec = (xl_heap_update * ) rec ;
7172
72- if (xl_info & XLOG_HEAP_INIT_PAGE )
73+ if (record -> xl_info & XLOG_HEAP_INIT_PAGE )
7374 appendStringInfoString (buf , "update(init): " );
7475 else
7576 appendStringInfoString (buf , "update: " );
@@ -85,7 +86,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
8586 {
8687 xl_heap_update * xlrec = (xl_heap_update * ) rec ;
8788
88- if (xl_info & XLOG_HEAP_INIT_PAGE ) /* can this case happen? */
89+ if (record -> xl_info & XLOG_HEAP_INIT_PAGE ) /* can this case happen? */
8990 appendStringInfoString (buf , "hot_update(init): " );
9091 else
9192 appendStringInfoString (buf , "hot_update: " );
@@ -126,9 +127,10 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
126127 appendStringInfoString (buf , "UNKNOWN" );
127128}
128129void
129- heap2_desc (StringInfo buf , uint8 xl_info , char * rec )
130+ heap2_desc (StringInfo buf , XLogRecord * record )
130131{
131- uint8 info = xl_info & ~XLR_INFO_MASK ;
132+ char * rec = XLogRecGetData (record );
133+ uint8 info = record -> xl_info & ~XLR_INFO_MASK ;
132134
133135 info &= XLOG_HEAP_OPMASK ;
134136 if (info == XLOG_HEAP2_CLEAN )
@@ -172,7 +174,7 @@ heap2_desc(StringInfo buf, uint8 xl_info, char *rec)
172174 {
173175 xl_heap_multi_insert * xlrec = (xl_heap_multi_insert * ) rec ;
174176
175- if (xl_info & XLOG_HEAP_INIT_PAGE )
177+ if (record -> xl_info & XLOG_HEAP_INIT_PAGE )
176178 appendStringInfoString (buf , "multi-insert (init): " );
177179 else
178180 appendStringInfoString (buf , "multi-insert: " );
0 commit comments