aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/pg_xlogdump/pg_xlogdump.c2
-rw-r--r--contrib/pg_xlogdump/rmgrdesc.h2
-rw-r--r--src/backend/access/rmgrdesc/clogdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/dbasedesc.c5
-rw-r--r--src/backend/access/rmgrdesc/gindesc.c9
-rw-r--r--src/backend/access/rmgrdesc/gistdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/hashdesc.c2
-rw-r--r--src/backend/access/rmgrdesc/heapdesc.c18
-rw-r--r--src/backend/access/rmgrdesc/mxactdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/nbtdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/relmapdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/seqdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/smgrdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/spgdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/standbydesc.c5
-rw-r--r--src/backend/access/rmgrdesc/tblspcdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/xactdesc.c5
-rw-r--r--src/backend/access/rmgrdesc/xlogdesc.c5
-rw-r--r--src/backend/access/transam/xlog.c11
-rw-r--r--src/include/access/clog.h2
-rw-r--r--src/include/access/gin.h2
-rw-r--r--src/include/access/gist_private.h2
-rw-r--r--src/include/access/hash.h2
-rw-r--r--src/include/access/heapam_xlog.h8
-rw-r--r--src/include/access/multixact.h2
-rw-r--r--src/include/access/nbtree.h2
-rw-r--r--src/include/access/spgist.h2
-rw-r--r--src/include/access/xact.h2
-rw-r--r--src/include/access/xlog.h2
-rw-r--r--src/include/access/xlog_internal.h2
-rw-r--r--src/include/catalog/storage_xlog.h2
-rw-r--r--src/include/commands/dbcommands.h2
-rw-r--r--src/include/commands/sequence.h2
-rw-r--r--src/include/commands/tablespace.h2
-rw-r--r--src/include/pg_config_manual.h2
-rw-r--r--src/include/storage/standby.h2
-rw-r--r--src/include/utils/relmapper.h2
37 files changed, 82 insertions, 69 deletions
diff --git a/contrib/pg_xlogdump/pg_xlogdump.c b/contrib/pg_xlogdump/pg_xlogdump.c
index 824b8c393c9..c555786401f 100644
--- a/contrib/pg_xlogdump/pg_xlogdump.c
+++ b/contrib/pg_xlogdump/pg_xlogdump.c
@@ -351,7 +351,7 @@ XLogDumpDisplayRecord(XLogDumpConfig *config, XLogRecPtr ReadRecPtr, XLogRecord
!!(XLR_BKP_BLOCK(3) & record->xl_info));
/* the desc routine will printf the description directly to stdout */
- desc->rm_desc(NULL, record->xl_info, XLogRecGetData(record));
+ desc->rm_desc(NULL, record);
putchar('\n');
diff --git a/contrib/pg_xlogdump/rmgrdesc.h b/contrib/pg_xlogdump/rmgrdesc.h
index edf82577514..d9641181401 100644
--- a/contrib/pg_xlogdump/rmgrdesc.h
+++ b/contrib/pg_xlogdump/rmgrdesc.h
@@ -13,7 +13,7 @@
typedef struct RmgrDescData
{
const char *rm_name;
- void (*rm_desc) (StringInfo buf, uint8 xl_info, char *rec);
+ void (*rm_desc) (StringInfo buf, XLogRecord *record);
} RmgrDescData;
extern const RmgrDescData RmgrDescTable[];
diff --git a/src/backend/access/rmgrdesc/clogdesc.c b/src/backend/access/rmgrdesc/clogdesc.c
index 25a85228f38..e82baa8d00d 100644
--- a/src/backend/access/rmgrdesc/clogdesc.c
+++ b/src/backend/access/rmgrdesc/clogdesc.c
@@ -18,9 +18,10 @@
void
-clog_desc(StringInfo buf, uint8 xl_info, char *rec)
+clog_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == CLOG_ZEROPAGE)
{
diff --git a/src/backend/access/rmgrdesc/dbasedesc.c b/src/backend/access/rmgrdesc/dbasedesc.c
index 1ea02e7fe7a..0230716509f 100644
--- a/src/backend/access/rmgrdesc/dbasedesc.c
+++ b/src/backend/access/rmgrdesc/dbasedesc.c
@@ -19,9 +19,10 @@
void
-dbase_desc(StringInfo buf, uint8 xl_info, char *rec)
+dbase_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_DBASE_CREATE)
{
diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index cd1edfffa25..12d68d7d40a 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -77,9 +77,10 @@ desc_recompress_leaf(StringInfo buf, ginxlogRecompressDataLeaf *insertData)
}
void
-gin_desc(StringInfo buf, uint8 xl_info, char *rec)
+gin_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
switch (info)
{
@@ -121,7 +122,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
ginxlogRecompressDataLeaf *insertData =
(ginxlogRecompressDataLeaf *) payload;
- if (xl_info & XLR_BKP_BLOCK(0))
+ if (record->xl_info & XLR_BKP_BLOCK(0))
appendStringInfo(buf, " (full page image)");
else
desc_recompress_leaf(buf, insertData);
@@ -159,7 +160,7 @@ gin_desc(StringInfo buf, uint8 xl_info, char *rec)
appendStringInfoString(buf, "Vacuum data leaf page, ");
desc_node(buf, xlrec->node, xlrec->blkno);
- if (xl_info & XLR_BKP_BLOCK(0))
+ if (record->xl_info & XLR_BKP_BLOCK(0))
appendStringInfo(buf, " (full page image)");
else
desc_recompress_leaf(buf, &xlrec->data);
diff --git a/src/backend/access/rmgrdesc/gistdesc.c b/src/backend/access/rmgrdesc/gistdesc.c
index b7f876622be..cdac4968820 100644
--- a/src/backend/access/rmgrdesc/gistdesc.c
+++ b/src/backend/access/rmgrdesc/gistdesc.c
@@ -42,9 +42,10 @@ out_gistxlogPageSplit(StringInfo buf, gistxlogPageSplit *xlrec)
}
void
-gist_desc(StringInfo buf, uint8 xl_info, char *rec)
+gist_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
switch (info)
{
diff --git a/src/backend/access/rmgrdesc/hashdesc.c b/src/backend/access/rmgrdesc/hashdesc.c
index 23be85698eb..86a0376dabd 100644
--- a/src/backend/access/rmgrdesc/hashdesc.c
+++ b/src/backend/access/rmgrdesc/hashdesc.c
@@ -17,6 +17,6 @@
#include "access/hash.h"
void
-hash_desc(StringInfo buf, uint8 xl_info, char *rec)
+hash_desc(StringInfo buf, XLogRecord *record)
{
}
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c
index c8a61669dd2..7df18fa2d2c 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: ");
diff --git a/src/backend/access/rmgrdesc/mxactdesc.c b/src/backend/access/rmgrdesc/mxactdesc.c
index daf9b4100ea..50d9b55ea9e 100644
--- a/src/backend/access/rmgrdesc/mxactdesc.c
+++ b/src/backend/access/rmgrdesc/mxactdesc.c
@@ -47,9 +47,10 @@ out_member(StringInfo buf, MultiXactMember *member)
}
void
-multixact_desc(StringInfo buf, uint8 xl_info, char *rec)
+multixact_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_MULTIXACT_ZERO_OFF_PAGE)
{
diff --git a/src/backend/access/rmgrdesc/nbtdesc.c b/src/backend/access/rmgrdesc/nbtdesc.c
index a3c746f1a84..bf3389cbcd4 100644
--- a/src/backend/access/rmgrdesc/nbtdesc.c
+++ b/src/backend/access/rmgrdesc/nbtdesc.c
@@ -26,9 +26,10 @@ out_target(StringInfo buf, xl_btreetid *target)
}
void
-btree_desc(StringInfo buf, uint8 xl_info, char *rec)
+btree_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
switch (info)
{
diff --git a/src/backend/access/rmgrdesc/relmapdesc.c b/src/backend/access/rmgrdesc/relmapdesc.c
index 84090163191..06fd4b3a997 100644
--- a/src/backend/access/rmgrdesc/relmapdesc.c
+++ b/src/backend/access/rmgrdesc/relmapdesc.c
@@ -17,9 +17,10 @@
#include "utils/relmapper.h"
void
-relmap_desc(StringInfo buf, uint8 xl_info, char *rec)
+relmap_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_RELMAP_UPDATE)
{
diff --git a/src/backend/access/rmgrdesc/seqdesc.c b/src/backend/access/rmgrdesc/seqdesc.c
index 726fb2acf76..42eb9b91609 100644
--- a/src/backend/access/rmgrdesc/seqdesc.c
+++ b/src/backend/access/rmgrdesc/seqdesc.c
@@ -18,9 +18,10 @@
void
-seq_desc(StringInfo buf, uint8 xl_info, char *rec)
+seq_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
xl_seq_rec *xlrec = (xl_seq_rec *) rec;
if (info == XLOG_SEQ_LOG)
diff --git a/src/backend/access/rmgrdesc/smgrdesc.c b/src/backend/access/rmgrdesc/smgrdesc.c
index aa72d4c4c3a..c76c8156c5e 100644
--- a/src/backend/access/rmgrdesc/smgrdesc.c
+++ b/src/backend/access/rmgrdesc/smgrdesc.c
@@ -19,9 +19,10 @@
void
-smgr_desc(StringInfo buf, uint8 xl_info, char *rec)
+smgr_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_SMGR_CREATE)
{
diff --git a/src/backend/access/rmgrdesc/spgdesc.c b/src/backend/access/rmgrdesc/spgdesc.c
index 9c41097f199..ed369b25acd 100644
--- a/src/backend/access/rmgrdesc/spgdesc.c
+++ b/src/backend/access/rmgrdesc/spgdesc.c
@@ -24,9 +24,10 @@ out_target(StringInfo buf, RelFileNode node)
}
void
-spg_desc(StringInfo buf, uint8 xl_info, char *rec)
+spg_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
switch (info)
{
diff --git a/src/backend/access/rmgrdesc/standbydesc.c b/src/backend/access/rmgrdesc/standbydesc.c
index 80cc7dcdec3..a127d388927 100644
--- a/src/backend/access/rmgrdesc/standbydesc.c
+++ b/src/backend/access/rmgrdesc/standbydesc.c
@@ -37,9 +37,10 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec)
}
void
-standby_desc(StringInfo buf, uint8 xl_info, char *rec)
+standby_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_STANDBY_LOCK)
{
diff --git a/src/backend/access/rmgrdesc/tblspcdesc.c b/src/backend/access/rmgrdesc/tblspcdesc.c
index a0ccd0e25ac..30b1f06106b 100644
--- a/src/backend/access/rmgrdesc/tblspcdesc.c
+++ b/src/backend/access/rmgrdesc/tblspcdesc.c
@@ -18,9 +18,10 @@
void
-tblspc_desc(StringInfo buf, uint8 xl_info, char *rec)
+tblspc_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_TBLSPC_CREATE)
{
diff --git a/src/backend/access/rmgrdesc/xactdesc.c b/src/backend/access/rmgrdesc/xactdesc.c
index 7c43d4c06fd..994931e66c2 100644
--- a/src/backend/access/rmgrdesc/xactdesc.c
+++ b/src/backend/access/rmgrdesc/xactdesc.c
@@ -137,9 +137,10 @@ xact_desc_assignment(StringInfo buf, xl_xact_assignment *xlrec)
}
void
-xact_desc(StringInfo buf, uint8 xl_info, char *rec)
+xact_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_XACT_COMMIT_COMPACT)
{
diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c
index e3d7b6681f3..2224da1320e 100644
--- a/src/backend/access/rmgrdesc/xlogdesc.c
+++ b/src/backend/access/rmgrdesc/xlogdesc.c
@@ -32,9 +32,10 @@ const struct config_enum_entry wal_level_options[] = {
};
void
-xlog_desc(StringInfo buf, uint8 xl_info, char *rec)
+xlog_desc(StringInfo buf, XLogRecord *record)
{
- uint8 info = xl_info & ~XLR_INFO_MASK;
+ char *rec = XLogRecGetData(record);
+ uint8 info = record->xl_info & ~XLR_INFO_MASK;
if (info == XLOG_CHECKPOINT_SHUTDOWN ||
info == XLOG_CHECKPOINT_ONLINE)
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 3f92482b42d..029c68e53d3 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1276,11 +1276,12 @@ begin:;
rdt_lastnormal->next = NULL;
initStringInfo(&recordbuf);
+ appendBinaryStringInfo(&recordbuf, (char *) &rechdr, sizeof(XLogRecord));
for (; rdata != NULL; rdata = rdata->next)
appendBinaryStringInfo(&recordbuf, rdata->data, rdata->len);
appendStringInfoString(&buf, " - ");
- RmgrTable[rechdr->xl_rmid].rm_desc(&buf, rechdr->xl_info, recordbuf.data);
+ RmgrTable[rechdr->xl_rmid].rm_desc(&buf, (XLogRecord *) recordbuf.data);
pfree(recordbuf.data);
}
elog(LOG, "%s", buf.data);
@@ -6627,9 +6628,7 @@ StartupXLOG(void)
(uint32) (EndRecPtr >> 32), (uint32) EndRecPtr);
xlog_outrec(&buf, record);
appendStringInfoString(&buf, " - ");
- RmgrTable[record->xl_rmid].rm_desc(&buf,
- record->xl_info,
- XLogRecGetData(record));
+ RmgrTable[record->xl_rmid].rm_desc(&buf, record);
elog(LOG, "%s", buf.data);
pfree(buf.data);
}
@@ -10453,9 +10452,7 @@ rm_redo_error_callback(void *arg)
StringInfoData buf;
initStringInfo(&buf);
- RmgrTable[record->xl_rmid].rm_desc(&buf,
- record->xl_info,
- XLogRecGetData(record));
+ RmgrTable[record->xl_rmid].rm_desc(&buf, record);
/* don't bother emitting empty description */
if (buf.len > 0)
diff --git a/src/include/access/clog.h b/src/include/access/clog.h
index 66a6d17f18c..be9b8675a41 100644
--- a/src/include/access/clog.h
+++ b/src/include/access/clog.h
@@ -48,6 +48,6 @@ extern void TruncateCLOG(TransactionId oldestXact);
#define CLOG_TRUNCATE 0x10
extern void clog_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void clog_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void clog_desc(StringInfo buf, XLogRecord *record);
#endif /* CLOG_H */
diff --git a/src/include/access/gin.h b/src/include/access/gin.h
index 4cda0ecbab7..a0b288d957a 100644
--- a/src/include/access/gin.h
+++ b/src/include/access/gin.h
@@ -73,7 +73,7 @@ extern void ginUpdateStats(Relation index, const GinStatsData *stats);
/* ginxlog.c */
extern void gin_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void gin_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void gin_desc(StringInfo buf, XLogRecord *record);
extern void gin_xlog_startup(void);
extern void gin_xlog_cleanup(void);
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index 089c6794213..03e9903e8a0 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -451,7 +451,7 @@ extern SplitedPageLayout *gistSplit(Relation r, Page page, IndexTuple *itup,
/* gistxlog.c */
extern void gist_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void gist_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void gist_desc(StringInfo buf, XLogRecord *record);
extern void gist_xlog_startup(void);
extern void gist_xlog_cleanup(void);
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index d89bcea39d2..2062801db5c 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -355,6 +355,6 @@ extern OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value);
/* hash.c */
extern void hash_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void hash_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void hash_desc(StringInfo buf, XLogRecord *record);
#endif /* HASH_H */
diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h
index cfdd1ffbefc..05beb005450 100644
--- a/src/include/access/heapam_xlog.h
+++ b/src/include/access/heapam_xlog.h
@@ -367,10 +367,10 @@ typedef struct xl_heap_rewrite_mapping
extern void HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
TransactionId *latestRemovedXid);
-extern void heap_redo(XLogRecPtr lsn, XLogRecord *rptr);
-extern void heap_desc(StringInfo buf, uint8 xl_info, char *rec);
-extern void heap2_redo(XLogRecPtr lsn, XLogRecord *rptr);
-extern void heap2_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void heap_redo(XLogRecPtr lsn, XLogRecord *record);
+extern void heap_desc(StringInfo buf, XLogRecord *record);
+extern void heap2_redo(XLogRecPtr lsn, XLogRecord *record);
+extern void heap2_desc(StringInfo buf, XLogRecord *record);
extern void heap_xlog_logical_rewrite(XLogRecPtr lsn, XLogRecord *r);
extern XLogRecPtr log_heap_cleanup_info(RelFileNode rnode,
diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h
index 80c70748cf2..448ec100d39 100644
--- a/src/include/access/multixact.h
+++ b/src/include/access/multixact.h
@@ -134,7 +134,7 @@ extern void multixact_twophase_postabort(TransactionId xid, uint16 info,
void *recdata, uint32 len);
extern void multixact_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void multixact_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void multixact_desc(StringInfo buf, XLogRecord *record);
extern char *mxid_to_string(MultiXactId multi, int nmembers,
MultiXactMember *members);
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index f2817590c41..ed6f697c8ed 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -724,6 +724,6 @@ extern void _bt_leafbuild(BTSpool *btspool, BTSpool *spool2);
* prototypes for functions in nbtxlog.c
*/
extern void btree_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void btree_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void btree_desc(StringInfo buf, XLogRecord *record);
#endif /* NBTREE_H */
diff --git a/src/include/access/spgist.h b/src/include/access/spgist.h
index 9187b4ac413..7f8655cf60e 100644
--- a/src/include/access/spgist.h
+++ b/src/include/access/spgist.h
@@ -197,7 +197,7 @@ extern Datum spgvacuumcleanup(PG_FUNCTION_ARGS);
/* spgxlog.c */
extern void spg_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void spg_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void spg_desc(StringInfo buf, XLogRecord *record);
extern void spg_xlog_startup(void);
extern void spg_xlog_cleanup(void);
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 634f5b2480c..10ee9433521 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -256,6 +256,6 @@ extern void UnregisterSubXactCallback(SubXactCallback callback, void *arg);
extern int xactGetCommittedChildren(TransactionId **ptr);
extern void xact_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void xact_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void xact_desc(StringInfo buf, XLogRecord *record);
#endif /* XACT_H */
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index 1eaa5c1c210..85f9cb7cab2 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -298,7 +298,7 @@ extern Buffer RestoreBackupBlock(XLogRecPtr lsn, XLogRecord *record,
bool get_cleanup_lock, bool keep_buffer);
extern void xlog_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void xlog_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void xlog_desc(StringInfo buf, XLogRecord *record);
extern void issue_xlog_fsync(int fd, XLogSegNo segno);
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 3a692cdf0c8..8c8de387e02 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -245,7 +245,7 @@ typedef struct RmgrData
{
const char *rm_name;
void (*rm_redo) (XLogRecPtr lsn, struct XLogRecord *rptr);
- void (*rm_desc) (StringInfo buf, uint8 xl_info, char *rec);
+ void (*rm_desc) (StringInfo buf, struct XLogRecord *rptr);
void (*rm_startup) (void);
void (*rm_cleanup) (void);
} RmgrData;
diff --git a/src/include/catalog/storage_xlog.h b/src/include/catalog/storage_xlog.h
index 43bf277f35b..7081c990ada 100644
--- a/src/include/catalog/storage_xlog.h
+++ b/src/include/catalog/storage_xlog.h
@@ -44,6 +44,6 @@ typedef struct xl_smgr_truncate
extern void log_smgrcreate(RelFileNode *rnode, ForkNumber forkNum);
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void smgr_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void smgr_desc(StringInfo buf, XLogRecord *record);
#endif /* STORAGE_XLOG_H */
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index fa10295d3a8..c2380dca111 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -63,7 +63,7 @@ extern Oid get_database_oid(const char *dbname, bool missingok);
extern char *get_database_name(Oid dbid);
extern void dbase_redo(XLogRecPtr lsn, XLogRecord *rptr);
-extern void dbase_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void dbase_desc(StringInfo buf, XLogRecord *rptr);
extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h
index 7d8a370ddb9..8819c00e812 100644
--- a/src/include/commands/sequence.h
+++ b/src/include/commands/sequence.h
@@ -77,6 +77,6 @@ extern void ResetSequence(Oid seq_relid);
extern void ResetSequenceCaches(void);
extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr);
-extern void seq_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void seq_desc(StringInfo buf, XLogRecord *rptr);
#endif /* SEQUENCE_H */
diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h
index 1603f677a7d..073cb0d64a1 100644
--- a/src/include/commands/tablespace.h
+++ b/src/include/commands/tablespace.h
@@ -57,6 +57,6 @@ extern char *get_tablespace_name(Oid spc_oid);
extern bool directory_is_empty(const char *path);
extern void tblspc_redo(XLogRecPtr lsn, XLogRecord *rptr);
-extern void tblspc_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void tblspc_desc(StringInfo buf, XLogRecord *rptr);
#endif /* TABLESPACE_H */
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index d1f99fbafef..0f4402fd96e 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -281,7 +281,7 @@
* Enable debugging print statements for WAL-related operations; see
* also the wal_debug GUC var.
*/
-/* #define WAL_DEBUG */
+#define WAL_DEBUG
/*
* Enable tracing of resource consumption during sort operations;
diff --git a/src/include/storage/standby.h b/src/include/storage/standby.h
index 89ab704699b..da22fd31499 100644
--- a/src/include/storage/standby.h
+++ b/src/include/storage/standby.h
@@ -82,7 +82,7 @@ typedef struct xl_running_xacts
/* Recovery handlers for the Standby Rmgr (RM_STANDBY_ID) */
extern void standby_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void standby_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void standby_desc(StringInfo buf, XLogRecord *record);
/*
* Declarations for GetRunningTransactionData(). Similar to Snapshots, but
diff --git a/src/include/utils/relmapper.h b/src/include/utils/relmapper.h
index 2452c94352a..76bcf18d5ab 100644
--- a/src/include/utils/relmapper.h
+++ b/src/include/utils/relmapper.h
@@ -59,6 +59,6 @@ extern void RelationMapInitializePhase2(void);
extern void RelationMapInitializePhase3(void);
extern void relmap_redo(XLogRecPtr lsn, XLogRecord *record);
-extern void relmap_desc(StringInfo buf, uint8 xl_info, char *rec);
+extern void relmap_desc(StringInfo buf, XLogRecord *record);
#endif /* RELMAPPER_H */