From 0ef0b6784c7d7258cae314cb46558873edaf9c0a Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Sat, 14 Jun 2014 10:46:48 +0300 Subject: [PATCH] Change the signature of rm_desc so that it's passed a XLogRecord. Just feels more natural, and is more consistent with rm_redo. --- contrib/pg_xlogdump/pg_xlogdump.c | 2 +- contrib/pg_xlogdump/rmgrdesc.h | 2 +- src/backend/access/rmgrdesc/clogdesc.c | 5 +++-- src/backend/access/rmgrdesc/dbasedesc.c | 5 +++-- src/backend/access/rmgrdesc/gindesc.c | 9 +++++---- src/backend/access/rmgrdesc/gistdesc.c | 5 +++-- src/backend/access/rmgrdesc/hashdesc.c | 2 +- src/backend/access/rmgrdesc/heapdesc.c | 18 ++++++++++-------- src/backend/access/rmgrdesc/mxactdesc.c | 5 +++-- src/backend/access/rmgrdesc/nbtdesc.c | 5 +++-- src/backend/access/rmgrdesc/relmapdesc.c | 5 +++-- src/backend/access/rmgrdesc/seqdesc.c | 5 +++-- src/backend/access/rmgrdesc/smgrdesc.c | 5 +++-- src/backend/access/rmgrdesc/spgdesc.c | 5 +++-- src/backend/access/rmgrdesc/standbydesc.c | 5 +++-- src/backend/access/rmgrdesc/tblspcdesc.c | 5 +++-- src/backend/access/rmgrdesc/xactdesc.c | 5 +++-- src/backend/access/rmgrdesc/xlogdesc.c | 5 +++-- src/backend/access/transam/xlog.c | 11 ++++------- src/include/access/clog.h | 2 +- src/include/access/gin.h | 2 +- src/include/access/gist_private.h | 2 +- src/include/access/hash.h | 2 +- src/include/access/heapam_xlog.h | 8 ++++---- src/include/access/multixact.h | 2 +- src/include/access/nbtree.h | 2 +- src/include/access/spgist.h | 2 +- src/include/access/xact.h | 2 +- src/include/access/xlog.h | 2 +- src/include/access/xlog_internal.h | 2 +- src/include/catalog/storage_xlog.h | 2 +- src/include/commands/dbcommands.h | 2 +- src/include/commands/sequence.h | 2 +- src/include/commands/tablespace.h | 2 +- src/include/pg_config_manual.h | 2 +- src/include/storage/standby.h | 2 +- src/include/utils/relmapper.h | 2 +- 37 files changed, 82 insertions(+), 69 deletions(-) diff --git a/contrib/pg_xlogdump/pg_xlogdump.c b/contrib/pg_xlogdump/pg_xlogdump.c index 824b8c393c..c555786401 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 edf8257751..d964118140 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 25a85228f3..e82baa8d00 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 1ea02e7fe7..0230716509 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 cd1edfffa2..12d68d7d40 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 b7f876622b..cdac496882 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 23be85698e..86a0376dab 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 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: "); diff --git a/src/backend/access/rmgrdesc/mxactdesc.c b/src/backend/access/rmgrdesc/mxactdesc.c index daf9b4100e..50d9b55ea9 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 a3c746f1a8..bf3389cbcd 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 8409016319..06fd4b3a99 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 726fb2acf7..42eb9b9160 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 aa72d4c4c3..c76c8156c5 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 9c41097f19..ed369b25ac 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 80cc7dcdec..a127d38892 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 a0ccd0e25a..30b1f06106 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 7c43d4c06f..994931e66c 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 e3d7b6681f..2224da1320 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 3f92482b42..029c68e53d 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 66a6d17f18..be9b8675a4 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 4cda0ecbab..a0b288d957 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 089c679421..03e9903e8a 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 d89bcea39d..2062801db5 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 cfdd1ffbef..05beb00545 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 80c70748cf..448ec100d3 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 f2817590c4..ed6f697c8e 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 9187b4ac41..7f8655cf60 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 634f5b2480..10ee943352 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 1eaa5c1c21..85f9cb7cab 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 3a692cdf0c..8c8de387e0 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 43bf277f35..7081c990ad 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 fa10295d3a..c2380dca11 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 7d8a370ddb..8819c00e81 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 1603f677a7..073cb0d64a 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 d1f99fbafe..0f4402fd96 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 89ab704699..da22fd3149 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 2452c94352..76bcf18d5a 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 */ -- 2.40.0