@@ -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
4849info &=XLOG_HEAP_OPMASK ;
4950if (info == XLOG_HEAP_INSERT )
5051{
5152xl_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 )
5455appendStringInfoString (buf ,"insert(init): " );
5556else
5657appendStringInfoString (buf ,"insert: " );
@@ -69,7 +70,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
6970{
7071xl_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 )
7374appendStringInfoString (buf ,"update(init): " );
7475else
7576appendStringInfoString (buf ,"update: " );
@@ -85,7 +86,7 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
8586{
8687xl_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? */
8990appendStringInfoString (buf ,"hot_update(init): " );
9091else
9192appendStringInfoString (buf ,"hot_update: " );
@@ -126,9 +127,10 @@ heap_desc(StringInfo buf, uint8 xl_info, char *rec)
126127appendStringInfoString (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
133135info &=XLOG_HEAP_OPMASK ;
134136if (info == XLOG_HEAP2_CLEAN )
@@ -172,7 +174,7 @@ heap2_desc(StringInfo buf, uint8 xl_info, char *rec)
172174{
173175xl_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 )
176178appendStringInfoString (buf ,"multi-insert (init): " );
177179else
178180appendStringInfoString (buf ,"multi-insert: " );