Index: backend/access/gist/gistxlog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/gist/gistxlog.c,v retrieving revision 1.10 diff -c -r1.10 gistxlog.c *** backend/access/gist/gistxlog.c 5 Mar 2006 15:58:20 -0000 1.10 --- backend/access/gist/gistxlog.c 23 Mar 2006 09:45:52 -0000 *************** *** 442,508 **** } static void ! out_target(char *buf, RelFileNode node, ItemPointerData key) { ! sprintf(buf + strlen(buf), "rel %u/%u/%u; tid %u/%u", node.spcNode, node.dbNode, node.relNode, ItemPointerGetBlockNumber(&key), ItemPointerGetOffsetNumber(&key)); } static void ! out_gistxlogEntryUpdate(char *buf, gistxlogEntryUpdate *xlrec) { out_target(buf, xlrec->node, xlrec->key); ! sprintf(buf + strlen(buf), "; block number %u", ! xlrec->blkno); } static void ! out_gistxlogPageSplit(char *buf, gistxlogPageSplit *xlrec) { ! strcat(buf, "page_split: "); out_target(buf, xlrec->node, xlrec->key); ! sprintf(buf + strlen(buf), "; block number %u splits to %d pages", xlrec->origblkno, xlrec->npage); } void ! gist_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; switch (info) { case XLOG_GIST_ENTRY_UPDATE: ! strcat(buf, "entry_update: "); out_gistxlogEntryUpdate(buf, (gistxlogEntryUpdate *) rec); break; case XLOG_GIST_ENTRY_DELETE: ! strcat(buf, "entry_delete: "); out_gistxlogEntryUpdate(buf, (gistxlogEntryUpdate *) rec); break; case XLOG_GIST_NEW_ROOT: ! strcat(buf, "new_root: "); out_target(buf, ((gistxlogEntryUpdate *) rec)->node, ((gistxlogEntryUpdate *) rec)->key); break; case XLOG_GIST_PAGE_SPLIT: out_gistxlogPageSplit(buf, (gistxlogPageSplit *) rec); break; case XLOG_GIST_CREATE_INDEX: ! sprintf(buf + strlen(buf), "create_index: rel %u/%u/%u", ((RelFileNode *) rec)->spcNode, ((RelFileNode *) rec)->dbNode, ((RelFileNode *) rec)->relNode); break; case XLOG_GIST_INSERT_COMPLETE: ! sprintf(buf + strlen(buf), "complete_insert: rel %u/%u/%u", ((gistxlogInsertComplete *) rec)->node.spcNode, ((gistxlogInsertComplete *) rec)->node.dbNode, ((gistxlogInsertComplete *) rec)->node.relNode); break; default: ! elog(PANIC, "gist_desc: unknown op code %u", info); } } --- 442,507 ---- } static void ! out_target(StringInfo buf, RelFileNode node, ItemPointerData key) { ! appendStringInfo(buf, "rel %u/%u/%u; tid %u/%u", node.spcNode, node.dbNode, node.relNode, ItemPointerGetBlockNumber(&key), ItemPointerGetOffsetNumber(&key)); } static void ! out_gistxlogEntryUpdate(StringInfo buf, gistxlogEntryUpdate *xlrec) { out_target(buf, xlrec->node, xlrec->key); ! appendStringInfo(buf, "; block number %u", xlrec->blkno); } static void ! out_gistxlogPageSplit(StringInfo buf, gistxlogPageSplit *xlrec) { ! appendStringInfo(buf, "page_split: "); out_target(buf, xlrec->node, xlrec->key); ! appendStringInfo(buf, "; block number %u splits to %d pages", xlrec->origblkno, xlrec->npage); } void ! gist_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; switch (info) { case XLOG_GIST_ENTRY_UPDATE: ! appendStringInfo(buf, "entry_update: "); out_gistxlogEntryUpdate(buf, (gistxlogEntryUpdate *) rec); break; case XLOG_GIST_ENTRY_DELETE: ! appendStringInfo(buf, "entry_delete: "); out_gistxlogEntryUpdate(buf, (gistxlogEntryUpdate *) rec); break; case XLOG_GIST_NEW_ROOT: ! appendStringInfo(buf, "new_root: "); out_target(buf, ((gistxlogEntryUpdate *) rec)->node, ((gistxlogEntryUpdate *) rec)->key); break; case XLOG_GIST_PAGE_SPLIT: out_gistxlogPageSplit(buf, (gistxlogPageSplit *) rec); break; case XLOG_GIST_CREATE_INDEX: ! appendStringInfo(buf, "create_index: rel %u/%u/%u", ((RelFileNode *) rec)->spcNode, ((RelFileNode *) rec)->dbNode, ((RelFileNode *) rec)->relNode); break; case XLOG_GIST_INSERT_COMPLETE: ! appendStringInfo(buf, "complete_insert: rel %u/%u/%u", ((gistxlogInsertComplete *) rec)->node.spcNode, ((gistxlogInsertComplete *) rec)->node.dbNode, ((gistxlogInsertComplete *) rec)->node.relNode); break; default: ! appendStringInfo(buf, "UNKNOWN"); } } Index: backend/access/hash/hash.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/hash/hash.c,v retrieving revision 1.87 diff -c -r1.87 hash.c *** backend/access/hash/hash.c 5 Mar 2006 15:58:20 -0000 1.87 --- backend/access/hash/hash.c 23 Mar 2006 09:45:52 -0000 *************** *** 675,680 **** } void ! hash_desc(char *buf, uint8 xl_info, char *rec) { } --- 675,680 ---- } void ! hash_desc(StringInfo buf, uint8 xl_info, char *rec) { } Index: backend/access/heap/heapam.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/heap/heapam.c,v retrieving revision 1.208 diff -c -r1.208 heapam.c *** backend/access/heap/heapam.c 5 Mar 2006 15:58:21 -0000 1.208 --- backend/access/heap/heapam.c 23 Mar 2006 09:45:59 -0000 *************** *** 3363,3394 **** } static void ! out_target(char *buf, xl_heaptid *target) { ! sprintf(buf + strlen(buf), "rel %u/%u/%u; tid %u/%u", target->node.spcNode, target->node.dbNode, target->node.relNode, ItemPointerGetBlockNumber(&(target->tid)), ItemPointerGetOffsetNumber(&(target->tid))); } void ! heap_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; info &= XLOG_HEAP_OPMASK; if (info == XLOG_HEAP_INSERT) { xl_heap_insert *xlrec = (xl_heap_insert *) rec; ! strcat(buf, "insert: "); out_target(buf, &(xlrec->target)); } else if (info == XLOG_HEAP_DELETE) { xl_heap_delete *xlrec = (xl_heap_delete *) rec; ! strcat(buf, "delete: "); out_target(buf, &(xlrec->target)); } else if (info == XLOG_HEAP_UPDATE || info == XLOG_HEAP_MOVE) --- 3363,3394 ---- } static void ! out_target(StringInfo buf, xl_heaptid *target) { ! appendStringInfo(buf, "rel %u/%u/%u; tid %u/%u", target->node.spcNode, target->node.dbNode, target->node.relNode, ItemPointerGetBlockNumber(&(target->tid)), ItemPointerGetOffsetNumber(&(target->tid))); } void ! heap_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; info &= XLOG_HEAP_OPMASK; if (info == XLOG_HEAP_INSERT) { xl_heap_insert *xlrec = (xl_heap_insert *) rec; ! appendStringInfo(buf, "insert: "); out_target(buf, &(xlrec->target)); } else if (info == XLOG_HEAP_DELETE) { xl_heap_delete *xlrec = (xl_heap_delete *) rec; ! appendStringInfo(buf, "delete: "); out_target(buf, &(xlrec->target)); } else if (info == XLOG_HEAP_UPDATE || info == XLOG_HEAP_MOVE) *************** *** 3396,3406 **** xl_heap_update *xlrec = (xl_heap_update *) rec; if (info == XLOG_HEAP_UPDATE) ! strcat(buf, "update: "); else ! strcat(buf, "move: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; new %u/%u", ItemPointerGetBlockNumber(&(xlrec->newtid)), ItemPointerGetOffsetNumber(&(xlrec->newtid))); } --- 3396,3406 ---- xl_heap_update *xlrec = (xl_heap_update *) rec; if (info == XLOG_HEAP_UPDATE) ! appendStringInfo(buf, "update: "); else ! appendStringInfo(buf, "move: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; new %u/%u", ItemPointerGetBlockNumber(&(xlrec->newtid)), ItemPointerGetOffsetNumber(&(xlrec->newtid))); } *************** *** 3408,3414 **** { xl_heap_clean *xlrec = (xl_heap_clean *) rec; ! sprintf(buf + strlen(buf), "clean: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->block); } --- 3408,3414 ---- { xl_heap_clean *xlrec = (xl_heap_clean *) rec; ! appendStringInfo(buf, "clean: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->block); } *************** *** 3416,3422 **** { xl_heap_newpage *xlrec = (xl_heap_newpage *) rec; ! sprintf(buf + strlen(buf), "newpage: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->blkno); } --- 3416,3422 ---- { xl_heap_newpage *xlrec = (xl_heap_newpage *) rec; ! appendStringInfo(buf, "newpage: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->blkno); } *************** *** 3425,3440 **** xl_heap_lock *xlrec = (xl_heap_lock *) rec; if (xlrec->shared_lock) ! strcat(buf, "shared_lock: "); else ! strcat(buf, "exclusive_lock: "); if (xlrec->xid_is_mxact) ! strcat(buf, "mxid "); else ! strcat(buf, "xid "); ! sprintf(buf + strlen(buf), "%u ", xlrec->locking_xid); out_target(buf, &(xlrec->target)); } else ! strcat(buf, "UNKNOWN"); } --- 3425,3440 ---- xl_heap_lock *xlrec = (xl_heap_lock *) rec; if (xlrec->shared_lock) ! appendStringInfo(buf, "shared_lock: "); else ! appendStringInfo(buf, "exclusive_lock: "); if (xlrec->xid_is_mxact) ! appendStringInfo(buf, "mxid "); else ! appendStringInfo(buf, "xid "); ! appendStringInfo(buf, "%u ", xlrec->locking_xid); out_target(buf, &(xlrec->target)); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/access/nbtree/nbtxlog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/nbtree/nbtxlog.c,v retrieving revision 1.26 diff -c -r1.26 nbtxlog.c *** backend/access/nbtree/nbtxlog.c 5 Mar 2006 15:58:21 -0000 1.26 --- backend/access/nbtree/nbtxlog.c 23 Mar 2006 09:46:00 -0000 *************** *** 650,667 **** } static void ! out_target(char *buf, xl_btreetid *target) { ! sprintf(buf + strlen(buf), "rel %u/%u/%u; tid %u/%u", target->node.spcNode, target->node.dbNode, target->node.relNode, ItemPointerGetBlockNumber(&(target->tid)), ItemPointerGetOffsetNumber(&(target->tid))); } void ! btree_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; switch (info) { --- 650,667 ---- } static void ! out_target(StringInfo buf, xl_btreetid *target) { ! appendStringInfo(buf, "rel %u/%u/%u; tid %u/%u", target->node.spcNode, target->node.dbNode, target->node.relNode, ItemPointerGetBlockNumber(&(target->tid)), ItemPointerGetOffsetNumber(&(target->tid))); } void ! btree_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; switch (info) { *************** *** 669,675 **** { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! strcat(buf, "insert: "); out_target(buf, &(xlrec->target)); break; } --- 669,675 ---- { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! appendStringInfo(buf, "insert: "); out_target(buf, &(xlrec->target)); break; } *************** *** 677,683 **** { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! strcat(buf, "insert_upper: "); out_target(buf, &(xlrec->target)); break; } --- 677,683 ---- { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! appendStringInfo(buf, "insert_upper: "); out_target(buf, &(xlrec->target)); break; } *************** *** 685,691 **** { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! strcat(buf, "insert_meta: "); out_target(buf, &(xlrec->target)); break; } --- 685,691 ---- { xl_btree_insert *xlrec = (xl_btree_insert *) rec; ! appendStringInfo(buf, "insert_meta: "); out_target(buf, &(xlrec->target)); break; } *************** *** 693,701 **** { xl_btree_split *xlrec = (xl_btree_split *) rec; ! strcat(buf, "split_l: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } --- 693,701 ---- { xl_btree_split *xlrec = (xl_btree_split *) rec; ! appendStringInfo(buf, "split_l: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } *************** *** 703,711 **** { xl_btree_split *xlrec = (xl_btree_split *) rec; ! strcat(buf, "split_r: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } --- 703,711 ---- { xl_btree_split *xlrec = (xl_btree_split *) rec; ! appendStringInfo(buf, "split_r: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } *************** *** 713,721 **** { xl_btree_split *xlrec = (xl_btree_split *) rec; ! strcat(buf, "split_l_root: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } --- 713,721 ---- { xl_btree_split *xlrec = (xl_btree_split *) rec; ! appendStringInfo(buf, "split_l_root: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } *************** *** 723,731 **** { xl_btree_split *xlrec = (xl_btree_split *) rec; ! strcat(buf, "split_r_root: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } --- 723,731 ---- { xl_btree_split *xlrec = (xl_btree_split *) rec; ! appendStringInfo(buf, "split_r_root: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; oth %u; rgh %u", xlrec->otherblk, xlrec->rightblk); break; } *************** *** 733,739 **** { xl_btree_delete *xlrec = (xl_btree_delete *) rec; ! sprintf(buf + strlen(buf), "delete: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->block); break; --- 733,739 ---- { xl_btree_delete *xlrec = (xl_btree_delete *) rec; ! appendStringInfo(buf, "delete: rel %u/%u/%u; blk %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->block); break; *************** *** 743,751 **** { xl_btree_delete_page *xlrec = (xl_btree_delete_page *) rec; ! strcat(buf, "delete_page: "); out_target(buf, &(xlrec->target)); ! sprintf(buf + strlen(buf), "; dead %u; left %u; right %u", xlrec->deadblk, xlrec->leftblk, xlrec->rightblk); break; } --- 743,751 ---- { xl_btree_delete_page *xlrec = (xl_btree_delete_page *) rec; ! appendStringInfo(buf, "delete_page: "); out_target(buf, &(xlrec->target)); ! appendStringInfo(buf, "; dead %u; left %u; right %u", xlrec->deadblk, xlrec->leftblk, xlrec->rightblk); break; } *************** *** 753,759 **** { xl_btree_newroot *xlrec = (xl_btree_newroot *) rec; ! sprintf(buf + strlen(buf), "newroot: rel %u/%u/%u; root %u lev %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->rootblk, xlrec->level); --- 753,759 ---- { xl_btree_newroot *xlrec = (xl_btree_newroot *) rec; ! appendStringInfo(buf, "newroot: rel %u/%u/%u; root %u lev %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->rootblk, xlrec->level); *************** *** 763,769 **** { xl_btree_newmeta *xlrec = (xl_btree_newmeta *) rec; ! sprintf(buf + strlen(buf), "newmeta: rel %u/%u/%u; root %u lev %u fast %u lev %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->meta.root, xlrec->meta.level, --- 763,769 ---- { xl_btree_newmeta *xlrec = (xl_btree_newmeta *) rec; ! appendStringInfo(buf, "newmeta: rel %u/%u/%u; root %u lev %u fast %u lev %u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode, xlrec->meta.root, xlrec->meta.level, *************** *** 771,777 **** break; } default: ! strcat(buf, "UNKNOWN"); break; } } --- 771,777 ---- break; } default: ! appendStringInfo(buf, "UNKNOWN"); break; } } Index: backend/access/transam/clog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/clog.c,v retrieving revision 1.37 diff -c -r1.37 clog.c *** backend/access/transam/clog.c 5 Mar 2006 15:58:21 -0000 1.37 --- backend/access/transam/clog.c 23 Mar 2006 09:46:00 -0000 *************** *** 412,428 **** } void ! clog_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == CLOG_ZEROPAGE) { int pageno; memcpy(&pageno, rec, sizeof(int)); ! sprintf(buf + strlen(buf), "zeropage: %d", pageno); } else ! strcat(buf, "UNKNOWN"); } --- 412,428 ---- } void ! clog_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == CLOG_ZEROPAGE) { int pageno; memcpy(&pageno, rec, sizeof(int)); ! appendStringInfo(buf, "zeropage: %d", pageno); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/access/transam/multixact.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/multixact.c,v retrieving revision 1.16 diff -c -r1.16 multixact.c *** backend/access/transam/multixact.c 5 Mar 2006 15:58:21 -0000 1.16 --- backend/access/transam/multixact.c 23 Mar 2006 09:46:05 -0000 *************** *** 1887,1893 **** } void ! multixact_desc(char *buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; --- 1887,1893 ---- } void ! multixact_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; *************** *** 1896,1920 **** int pageno; memcpy(&pageno, rec, sizeof(int)); ! sprintf(buf + strlen(buf), "zero offsets page: %d", pageno); } else if (info == XLOG_MULTIXACT_ZERO_MEM_PAGE) { int pageno; memcpy(&pageno, rec, sizeof(int)); ! sprintf(buf + strlen(buf), "zero members page: %d", pageno); } else if (info == XLOG_MULTIXACT_CREATE_ID) { xl_multixact_create *xlrec = (xl_multixact_create *) rec; int i; ! sprintf(buf + strlen(buf), "create multixact %u offset %u:", xlrec->mid, xlrec->moff); for (i = 0; i < xlrec->nxids; i++) ! sprintf(buf + strlen(buf), " %u", xlrec->xids[i]); } else ! strcat(buf, "UNKNOWN"); } --- 1896,1920 ---- int pageno; memcpy(&pageno, rec, sizeof(int)); ! appendStringInfo(buf, "zero offsets page: %d", pageno); } else if (info == XLOG_MULTIXACT_ZERO_MEM_PAGE) { int pageno; memcpy(&pageno, rec, sizeof(int)); ! appendStringInfo(buf, "zero members page: %d", pageno); } else if (info == XLOG_MULTIXACT_CREATE_ID) { xl_multixact_create *xlrec = (xl_multixact_create *) rec; int i; ! appendStringInfo(buf, "create multixact %u offset %u:", xlrec->mid, xlrec->moff); for (i = 0; i < xlrec->nxids; i++) ! appendStringInfo(buf, " %u", xlrec->xids[i]); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/access/transam/xact.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xact.c,v retrieving revision 1.217 diff -c -r1.217 xact.c *** backend/access/transam/xact.c 5 Mar 2006 15:58:22 -0000 1.217 --- backend/access/transam/xact.c 23 Mar 2006 09:46:11 -0000 *************** *** 4179,4200 **** } static void ! xact_desc_commit(char *buf, xl_xact_commit *xlrec) { struct tm *tm = localtime(&xlrec->xtime); int i; ! sprintf(buf + strlen(buf), "%04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); if (xlrec->nrels > 0) { ! sprintf(buf + strlen(buf), "; rels:"); for (i = 0; i < xlrec->nrels; i++) { RelFileNode rnode = xlrec->xnodes[i]; ! sprintf(buf + strlen(buf), " %u/%u/%u", rnode.spcNode, rnode.dbNode, rnode.relNode); } } --- 4179,4200 ---- } static void ! xact_desc_commit(StringInfo buf, xl_xact_commit *xlrec) { struct tm *tm = localtime(&xlrec->xtime); int i; ! appendStringInfo(buf, "%04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); if (xlrec->nrels > 0) { ! appendStringInfo(buf, "; rels:"); for (i = 0; i < xlrec->nrels; i++) { RelFileNode rnode = xlrec->xnodes[i]; ! appendStringInfo(buf, " %u/%u/%u", rnode.spcNode, rnode.dbNode, rnode.relNode); } } *************** *** 4203,4231 **** TransactionId *xacts = (TransactionId *) &xlrec->xnodes[xlrec->nrels]; ! sprintf(buf + strlen(buf), "; subxacts:"); for (i = 0; i < xlrec->nsubxacts; i++) ! sprintf(buf + strlen(buf), " %u", xacts[i]); } } static void ! xact_desc_abort(char *buf, xl_xact_abort *xlrec) { struct tm *tm = localtime(&xlrec->xtime); int i; ! sprintf(buf + strlen(buf), "%04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); if (xlrec->nrels > 0) { ! sprintf(buf + strlen(buf), "; rels:"); for (i = 0; i < xlrec->nrels; i++) { RelFileNode rnode = xlrec->xnodes[i]; ! sprintf(buf + strlen(buf), " %u/%u/%u", rnode.spcNode, rnode.dbNode, rnode.relNode); } } --- 4203,4231 ---- TransactionId *xacts = (TransactionId *) &xlrec->xnodes[xlrec->nrels]; ! appendStringInfo(buf, "; subxacts:"); for (i = 0; i < xlrec->nsubxacts; i++) ! appendStringInfo(buf, " %u", xacts[i]); } } static void ! xact_desc_abort(StringInfo buf, xl_xact_abort *xlrec) { struct tm *tm = localtime(&xlrec->xtime); int i; ! appendStringInfo(buf, "%04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); if (xlrec->nrels > 0) { ! appendStringInfo(buf, "; rels:"); for (i = 0; i < xlrec->nrels; i++) { RelFileNode rnode = xlrec->xnodes[i]; ! appendStringInfo(buf, " %u/%u/%u", rnode.spcNode, rnode.dbNode, rnode.relNode); } } *************** *** 4234,4282 **** TransactionId *xacts = (TransactionId *) &xlrec->xnodes[xlrec->nrels]; ! sprintf(buf + strlen(buf), "; subxacts:"); for (i = 0; i < xlrec->nsubxacts; i++) ! sprintf(buf + strlen(buf), " %u", xacts[i]); } } void ! xact_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == XLOG_XACT_COMMIT) { xl_xact_commit *xlrec = (xl_xact_commit *) rec; ! strcat(buf, "commit: "); xact_desc_commit(buf, xlrec); } else if (info == XLOG_XACT_ABORT) { xl_xact_abort *xlrec = (xl_xact_abort *) rec; ! strcat(buf, "abort: "); xact_desc_abort(buf, xlrec); } else if (info == XLOG_XACT_PREPARE) { ! strcat(buf, "prepare"); } else if (info == XLOG_XACT_COMMIT_PREPARED) { xl_xact_commit_prepared *xlrec = (xl_xact_commit_prepared *) rec; ! sprintf(buf + strlen(buf), "commit %u: ", xlrec->xid); xact_desc_commit(buf, &xlrec->crec); } else if (info == XLOG_XACT_ABORT_PREPARED) { xl_xact_abort_prepared *xlrec = (xl_xact_abort_prepared *) rec; ! sprintf(buf + strlen(buf), "abort %u: ", xlrec->xid); xact_desc_abort(buf, &xlrec->arec); } else ! strcat(buf, "UNKNOWN"); } --- 4234,4282 ---- TransactionId *xacts = (TransactionId *) &xlrec->xnodes[xlrec->nrels]; ! appendStringInfo(buf, "; subxacts:"); for (i = 0; i < xlrec->nsubxacts; i++) ! appendStringInfo(buf, " %u", xacts[i]); } } void ! xact_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == XLOG_XACT_COMMIT) { xl_xact_commit *xlrec = (xl_xact_commit *) rec; ! appendStringInfo(buf, "commit: "); xact_desc_commit(buf, xlrec); } else if (info == XLOG_XACT_ABORT) { xl_xact_abort *xlrec = (xl_xact_abort *) rec; ! appendStringInfo(buf, "abort: "); xact_desc_abort(buf, xlrec); } else if (info == XLOG_XACT_PREPARE) { ! appendStringInfo(buf, "prepare"); } else if (info == XLOG_XACT_COMMIT_PREPARED) { xl_xact_commit_prepared *xlrec = (xl_xact_commit_prepared *) rec; ! appendStringInfo(buf, "commit %u: ", xlrec->xid); xact_desc_commit(buf, &xlrec->crec); } else if (info == XLOG_XACT_ABORT_PREPARED) { xl_xact_abort_prepared *xlrec = (xl_xact_abort_prepared *) rec; ! appendStringInfo(buf, "abort %u: ", xlrec->xid); xact_desc_abort(buf, &xlrec->arec); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/access/transam/xlog.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xlog.c,v retrieving revision 1.227 diff -c -r1.227 xlog.c *** backend/access/transam/xlog.c 5 Mar 2006 15:58:22 -0000 1.227 --- backend/access/transam/xlog.c 23 Mar 2006 09:46:16 -0000 *************** *** 498,507 **** static void issue_xlog_fsync(void); #ifdef WAL_DEBUG ! static void xlog_outrec(char *buf, XLogRecord *record); #endif static bool read_backup_label(XLogRecPtr *checkPointLoc); static void remove_backup_label(void); /* --- 498,508 ---- static void issue_xlog_fsync(void); #ifdef WAL_DEBUG ! static void xlog_outrec(StringInfo buf, XLogRecord *record); #endif static bool read_backup_label(XLogRecPtr *checkPointLoc); static void remove_backup_label(void); + static void rm_redo_error_callback(void *arg); /* *************** *** 852,867 **** #ifdef WAL_DEBUG if (XLOG_DEBUG) { ! char buf[8192]; ! sprintf(buf, "INSERT @ %X/%X: ", RecPtr.xlogid, RecPtr.xrecoff); ! xlog_outrec(buf, record); if (rdata->data != NULL) { ! strcat(buf, " - "); ! RmgrTable[record->xl_rmid].rm_desc(buf, record->xl_info, rdata->data); } ! elog(LOG, "%s", buf); } #endif --- 853,870 ---- #ifdef WAL_DEBUG if (XLOG_DEBUG) { ! StringInfoData buf; ! initStringInfo(&buf); ! appendStringInfo(&buf, "INSERT @ %X/%X: ", ! RecPtr.xlogid, RecPtr.xrecoff); ! xlog_outrec(&buf, record); if (rdata->data != NULL) { ! appendStringInfo(&buf, " - "); ! RmgrTable[record->xl_rmid].rm_desc(&buf, record->xl_info, rdata->data); } ! elog(LOG, "%s", buf.data); } #endif *************** *** 4562,4567 **** --- 4565,4571 ---- { bool recoveryContinue = true; bool recoveryApply = true; + ErrorContextCallback errcontext; InRedo = true; ereport(LOG, *************** *** 4576,4591 **** #ifdef WAL_DEBUG if (XLOG_DEBUG) { ! char buf[8192]; ! sprintf(buf, "REDO @ %X/%X; LSN %X/%X: ", ReadRecPtr.xlogid, ReadRecPtr.xrecoff, EndRecPtr.xlogid, EndRecPtr.xrecoff); ! xlog_outrec(buf, record); ! strcat(buf, " - "); ! RmgrTable[record->xl_rmid].rm_desc(buf, record->xl_info, XLogRecGetData(record)); ! elog(LOG, "%s", buf); } #endif --- 4580,4596 ---- #ifdef WAL_DEBUG if (XLOG_DEBUG) { ! StringInfoData buf; ! initStringInfo(&buf); ! appendStringInfo(&buf, "REDO @ %X/%X; LSN %X/%X: ", ReadRecPtr.xlogid, ReadRecPtr.xrecoff, EndRecPtr.xlogid, EndRecPtr.xrecoff); ! xlog_outrec(&buf, record); ! appendStringInfo(&buf, " - "); ! RmgrTable[record->xl_rmid].rm_desc(&buf, record->xl_info, XLogRecGetData(record)); ! elog(LOG, "%s", buf.data); } #endif *************** *** 4611,4618 **** --- 4616,4632 ---- if (record->xl_info & XLR_BKP_BLOCK_MASK) RestoreBkpBlocks(record, EndRecPtr); + /* Setup error traceback support for ereport() */ + errcontext.callback = rm_redo_error_callback; + errcontext.arg = (void *) record; + errcontext.previous = error_context_stack; + error_context_stack = &errcontext; + RmgrTable[record->xl_rmid].rm_redo(EndRecPtr, record); + /* Pop the error context stack */ + error_context_stack = errcontext.previous; + LastRec = ReadRecPtr; record = ReadRecord(NULL, LOG); *************** *** 5400,5415 **** } void ! xlog_desc(char *buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == XLOG_CHECKPOINT_SHUTDOWN || info == XLOG_CHECKPOINT_ONLINE) { CheckPoint *checkpoint = (CheckPoint *) rec; ! sprintf(buf + strlen(buf), "checkpoint: redo %X/%X; undo %X/%X; " "tli %u; xid %u; oid %u; multi %u; offset %u; %s", checkpoint->redo.xlogid, checkpoint->redo.xrecoff, checkpoint->undo.xlogid, checkpoint->undo.xrecoff, --- 5414,5429 ---- } void ! xlog_desc(StringInfo buf, uint8 xl_info, char *rec) { ! uint8 info = xl_info & ~XLR_INFO_MASK; if (info == XLOG_CHECKPOINT_SHUTDOWN || info == XLOG_CHECKPOINT_ONLINE) { CheckPoint *checkpoint = (CheckPoint *) rec; ! appendStringInfo(buf, "checkpoint: redo %X/%X; undo %X/%X; " "tli %u; xid %u; oid %u; multi %u; offset %u; %s", checkpoint->redo.xlogid, checkpoint->redo.xrecoff, checkpoint->undo.xlogid, checkpoint->undo.xrecoff, *************** *** 5424,5444 **** Oid nextOid; memcpy(&nextOid, rec, sizeof(Oid)); ! sprintf(buf + strlen(buf), "nextOid: %u", nextOid); } else ! strcat(buf, "UNKNOWN"); } #ifdef WAL_DEBUG static void ! xlog_outrec(char *buf, XLogRecord *record) { int bkpb; int i; ! sprintf(buf + strlen(buf), "prev %X/%X; xid %u", record->xl_prev.xlogid, record->xl_prev.xrecoff, record->xl_xid); --- 5438,5458 ---- Oid nextOid; memcpy(&nextOid, rec, sizeof(Oid)); ! appendStringInfo(buf, "nextOid: %u", nextOid); } else ! appendStringInfo(buf, "UNKNOWN"); } #ifdef WAL_DEBUG static void ! xlog_outrec(StringInfo buf, XLogRecord *record) { int bkpb; int i; ! appendStringInfo(buf, "prev %X/%X; xid %u", record->xl_prev.xlogid, record->xl_prev.xrecoff, record->xl_xid); *************** *** 5450,5458 **** } if (bkpb) ! sprintf(buf + strlen(buf), "; bkpb %d", bkpb); ! sprintf(buf + strlen(buf), ": %s", RmgrTable[record->xl_rmid].rm_name); } #endif /* WAL_DEBUG */ --- 5464,5472 ---- } if (bkpb) ! appendStringInfo(buf, "; bkpb %d", bkpb); ! appendStringInfo(buf, ": %s", RmgrTable[record->xl_rmid].rm_name); } #endif /* WAL_DEBUG */ *************** *** 5976,5978 **** --- 5990,6011 ---- errmsg("could not remove file \"%s\": %m", BACKUP_LABEL_FILE))); } + + /* + * Error context callback for errors occurring during rm_redo(). + */ + static void + rm_redo_error_callback(void *arg) + { + StringInfoData buf; + XLogRecord *record = (XLogRecord *)arg; + + initStringInfo(&buf); + RmgrTable[record->xl_rmid].rm_desc(&buf, + record->xl_info, + XLogRecGetData(record)); + + /* watch empty description */ + if (buf.len > 0) + errcontext("redo %s", buf.data); + } Index: backend/commands/dbcommands.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/dbcommands.c,v retrieving revision 1.177 diff -c -r1.177 dbcommands.c *** backend/commands/dbcommands.c 5 Mar 2006 15:58:24 -0000 1.177 --- backend/commands/dbcommands.c 23 Mar 2006 09:46:18 -0000 *************** *** 1392,1398 **** } void ! dbase_desc(char *buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; --- 1392,1398 ---- } void ! dbase_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; *************** *** 1400,1406 **** { xl_dbase_create_rec *xlrec = (xl_dbase_create_rec *) rec; ! sprintf(buf + strlen(buf), "create db: copy dir %u/%u to %u/%u", xlrec->src_db_id, xlrec->src_tablespace_id, xlrec->db_id, xlrec->tablespace_id); } --- 1400,1406 ---- { xl_dbase_create_rec *xlrec = (xl_dbase_create_rec *) rec; ! appendStringInfo(buf, "create db: copy dir %u/%u to %u/%u", xlrec->src_db_id, xlrec->src_tablespace_id, xlrec->db_id, xlrec->tablespace_id); } *************** *** 1408,1416 **** { xl_dbase_drop_rec *xlrec = (xl_dbase_drop_rec *) rec; ! sprintf(buf + strlen(buf), "drop db: dir %u/%u", xlrec->db_id, xlrec->tablespace_id); } else ! strcat(buf, "UNKNOWN"); } --- 1408,1416 ---- { xl_dbase_drop_rec *xlrec = (xl_dbase_drop_rec *) rec; ! appendStringInfo(buf, "drop db: dir %u/%u", xlrec->db_id, xlrec->tablespace_id); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/commands/sequence.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/sequence.c,v retrieving revision 1.129 diff -c -r1.129 sequence.c *** backend/commands/sequence.c 14 Mar 2006 22:48:18 -0000 1.129 --- backend/commands/sequence.c 23 Mar 2006 09:46:19 -0000 *************** *** 1170,1188 **** } void ! seq_desc(char *buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; xl_seq_rec *xlrec = (xl_seq_rec *) rec; if (info == XLOG_SEQ_LOG) ! strcat(buf, "log: "); else { ! strcat(buf, "UNKNOWN"); return; } ! sprintf(buf + strlen(buf), "rel %u/%u/%u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode); } --- 1170,1188 ---- } void ! seq_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; xl_seq_rec *xlrec = (xl_seq_rec *) rec; if (info == XLOG_SEQ_LOG) ! appendStringInfo(buf, "log: "); else { ! appendStringInfo(buf, "UNKNOWN"); return; } ! appendStringInfo(buf, "rel %u/%u/%u", xlrec->node.spcNode, xlrec->node.dbNode, xlrec->node.relNode); } Index: backend/commands/tablecmds.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/tablecmds.c,v retrieving revision 1.181 diff -c -r1.181 tablecmds.c *** backend/commands/tablecmds.c 14 Mar 2006 22:48:18 -0000 1.181 --- backend/commands/tablecmds.c 23 Mar 2006 09:46:30 -0000 *************** *** 36,42 **** #include "commands/trigger.h" #include "commands/typecmds.h" #include "executor/executor.h" - #include "lib/stringinfo.h" #include "miscadmin.h" #include "nodes/makefuncs.h" #include "optimizer/clauses.h" --- 36,41 ---- Index: backend/commands/tablespace.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/commands/tablespace.c,v retrieving revision 1.31 diff -c -r1.31 tablespace.c *** backend/commands/tablespace.c 5 Mar 2006 15:58:25 -0000 1.31 --- backend/commands/tablespace.c 23 Mar 2006 09:46:30 -0000 *************** *** 1042,1048 **** } void ! tblspc_desc(char *buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; --- 1042,1048 ---- } void ! tblspc_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; *************** *** 1050,1065 **** { xl_tblspc_create_rec *xlrec = (xl_tblspc_create_rec *) rec; ! sprintf(buf + strlen(buf), "create ts: %u \"%s\"", xlrec->ts_id, xlrec->ts_path); } else if (info == XLOG_TBLSPC_DROP) { xl_tblspc_drop_rec *xlrec = (xl_tblspc_drop_rec *) rec; ! sprintf(buf + strlen(buf), "drop ts: %u", ! xlrec->ts_id); } else ! strcat(buf, "UNKNOWN"); } --- 1050,1064 ---- { xl_tblspc_create_rec *xlrec = (xl_tblspc_create_rec *) rec; ! appendStringInfo(buf, "create ts: %u \"%s\"", xlrec->ts_id, xlrec->ts_path); } else if (info == XLOG_TBLSPC_DROP) { xl_tblspc_drop_rec *xlrec = (xl_tblspc_drop_rec *) rec; ! appendStringInfo(buf, "drop ts: %u", xlrec->ts_id); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: backend/storage/smgr/smgr.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v retrieving revision 1.96 diff -c -r1.96 smgr.c *** backend/storage/smgr/smgr.c 5 Mar 2006 15:58:39 -0000 1.96 --- backend/storage/smgr/smgr.c 23 Mar 2006 09:46:32 -0000 *************** *** 942,948 **** } void ! smgr_desc(char *buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; --- 942,948 ---- } void ! smgr_desc(StringInfo buf, uint8 xl_info, char *rec) { uint8 info = xl_info & ~XLR_INFO_MASK; *************** *** 950,956 **** { xl_smgr_create *xlrec = (xl_smgr_create *) rec; ! sprintf(buf + strlen(buf), "file create: %u/%u/%u", xlrec->rnode.spcNode, xlrec->rnode.dbNode, xlrec->rnode.relNode); } --- 950,956 ---- { xl_smgr_create *xlrec = (xl_smgr_create *) rec; ! appendStringInfo(buf, "file create: %u/%u/%u", xlrec->rnode.spcNode, xlrec->rnode.dbNode, xlrec->rnode.relNode); } *************** *** 958,967 **** { xl_smgr_truncate *xlrec = (xl_smgr_truncate *) rec; ! sprintf(buf + strlen(buf), "file truncate: %u/%u/%u to %u blocks", xlrec->rnode.spcNode, xlrec->rnode.dbNode, xlrec->rnode.relNode, xlrec->blkno); } else ! strcat(buf, "UNKNOWN"); } --- 958,967 ---- { xl_smgr_truncate *xlrec = (xl_smgr_truncate *) rec; ! appendStringInfo(buf, "file truncate: %u/%u/%u to %u blocks", xlrec->rnode.spcNode, xlrec->rnode.dbNode, xlrec->rnode.relNode, xlrec->blkno); } else ! appendStringInfo(buf, "UNKNOWN"); } Index: include/access/clog.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/clog.h,v retrieving revision 1.16 diff -c -r1.16 clog.h *** include/access/clog.h 5 Mar 2006 15:58:53 -0000 1.16 --- include/access/clog.h 23 Mar 2006 09:46:33 -0000 *************** *** 48,53 **** #define CLOG_ZEROPAGE 0x00 extern void clog_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void clog_desc(char *buf, uint8 xl_info, char *rec); #endif /* CLOG_H */ --- 48,53 ---- #define CLOG_ZEROPAGE 0x00 extern void clog_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void clog_desc(StringInfo buf, uint8 xl_info, char *rec); #endif /* CLOG_H */ Index: include/access/gist_private.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/gist_private.h,v retrieving revision 1.10 diff -c -r1.10 gist_private.h *** include/access/gist_private.h 5 Mar 2006 15:58:53 -0000 1.10 --- include/access/gist_private.h 23 Mar 2006 09:46:34 -0000 *************** *** 244,250 **** /* gistxlog.c */ extern void gist_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void gist_desc(char *buf, uint8 xl_info, char *rec); extern void gist_xlog_startup(void); extern void gist_xlog_cleanup(void); extern IndexTuple gist_form_invalid_tuple(BlockNumber blkno); --- 244,250 ---- /* gistxlog.c */ extern void gist_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void gist_desc(StringInfo buf, uint8 xl_info, char *rec); extern void gist_xlog_startup(void); extern void gist_xlog_cleanup(void); extern IndexTuple gist_form_invalid_tuple(BlockNumber blkno); Index: include/access/hash.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/hash.h,v retrieving revision 1.66 diff -c -r1.66 hash.h *** include/access/hash.h 5 Mar 2006 15:58:53 -0000 1.66 --- include/access/hash.h 23 Mar 2006 09:46:34 -0000 *************** *** 306,311 **** /* hash.c */ extern void hash_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void hash_desc(char *buf, uint8 xl_info, char *rec); #endif /* HASH_H */ --- 306,311 ---- /* hash.c */ extern void hash_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void hash_desc(StringInfo buf, uint8 xl_info, char *rec); #endif /* HASH_H */ Index: include/access/heapam.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/heapam.h,v retrieving revision 1.106 diff -c -r1.106 heapam.h *** include/access/heapam.h 5 Mar 2006 15:58:53 -0000 1.106 --- include/access/heapam.h 23 Mar 2006 09:46:34 -0000 *************** *** 178,184 **** extern void heap_restrpos(HeapScanDesc scan); extern void heap_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void heap_desc(char *buf, uint8 xl_info, char *rec); extern XLogRecPtr log_heap_clean(Relation reln, Buffer buffer, OffsetNumber *unused, int uncnt); extern XLogRecPtr log_heap_move(Relation reln, Buffer oldbuf, --- 178,184 ---- extern void heap_restrpos(HeapScanDesc scan); extern void heap_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void heap_desc(StringInfo buf, uint8 xl_info, char *rec); extern XLogRecPtr log_heap_clean(Relation reln, Buffer buffer, OffsetNumber *unused, int uncnt); extern XLogRecPtr log_heap_move(Relation reln, Buffer oldbuf, Index: include/access/multixact.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/multixact.h,v retrieving revision 1.9 diff -c -r1.9 multixact.h *** include/access/multixact.h 5 Mar 2006 15:58:53 -0000 1.9 --- include/access/multixact.h 23 Mar 2006 09:46:34 -0000 *************** *** 67,72 **** MultiXactOffset minMultiOffset); extern void multixact_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void multixact_desc(char *buf, uint8 xl_info, char *rec); #endif /* MULTIXACT_H */ --- 67,72 ---- MultiXactOffset minMultiOffset); extern void multixact_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void multixact_desc(StringInfo buf, uint8 xl_info, char *rec); #endif /* MULTIXACT_H */ Index: include/access/nbtree.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/nbtree.h,v retrieving revision 1.92 diff -c -r1.92 nbtree.h *** include/access/nbtree.h 5 Mar 2006 15:58:53 -0000 1.92 --- include/access/nbtree.h 23 Mar 2006 09:46:35 -0000 *************** *** 470,476 **** * prototypes for functions in nbtxlog.c */ extern void btree_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void btree_desc(char *buf, uint8 xl_info, char *rec); extern void btree_xlog_startup(void); extern void btree_xlog_cleanup(void); --- 470,476 ---- * 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_xlog_startup(void); extern void btree_xlog_cleanup(void); Index: include/access/xact.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/xact.h,v retrieving revision 1.80 diff -c -r1.80 xact.h *** include/access/xact.h 5 Mar 2006 15:58:54 -0000 1.80 --- include/access/xact.h 23 Mar 2006 09:46:35 -0000 *************** *** 175,180 **** extern int xactGetCommittedChildren(TransactionId **ptr); extern void xact_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void xact_desc(char *buf, uint8 xl_info, char *rec); #endif /* XACT_H */ --- 175,180 ---- extern int xactGetCommittedChildren(TransactionId **ptr); extern void xact_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void xact_desc(StringInfo buf, uint8 xl_info, char *rec); #endif /* XACT_H */ Index: include/access/xlog.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/xlog.h,v retrieving revision 1.70 diff -c -r1.70 xlog.h *** include/access/xlog.h 5 Mar 2006 15:58:54 -0000 1.70 --- include/access/xlog.h 23 Mar 2006 09:46:35 -0000 *************** *** 16,22 **** #include "access/xlogdefs.h" #include "storage/buf.h" #include "utils/pg_crc.h" ! /* * The overall layout of an XLOG record is: --- 16,22 ---- #include "access/xlogdefs.h" #include "storage/buf.h" #include "utils/pg_crc.h" ! #include "lib/stringinfo.h" /* * The overall layout of an XLOG record is: *************** *** 152,158 **** extern void XLogFlush(XLogRecPtr RecPtr); extern void xlog_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void xlog_desc(char *buf, uint8 xl_info, char *rec); extern void UpdateControlFile(void); extern Size XLOGShmemSize(void); --- 152,158 ---- extern void XLogFlush(XLogRecPtr RecPtr); extern void xlog_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void xlog_desc(StringInfo buf, uint8 xl_info, char *rec); extern void UpdateControlFile(void); extern Size XLOGShmemSize(void); Index: include/access/xlog_internal.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/access/xlog_internal.h,v retrieving revision 1.10 diff -c -r1.10 xlog_internal.h *** include/access/xlog_internal.h 5 Mar 2006 15:58:54 -0000 1.10 --- include/access/xlog_internal.h 23 Mar 2006 09:46:36 -0000 *************** *** 228,234 **** { const char *rm_name; void (*rm_redo) (XLogRecPtr lsn, XLogRecord *rptr); ! void (*rm_desc) (char *buf, uint8 xl_info, char *rec); void (*rm_startup) (void); void (*rm_cleanup) (void); } RmgrData; --- 228,234 ---- { const char *rm_name; void (*rm_redo) (XLogRecPtr lsn, XLogRecord *rptr); ! void (*rm_desc) (StringInfo buf, uint8 xl_info, char *rec); void (*rm_startup) (void); void (*rm_cleanup) (void); } RmgrData; Index: include/commands/dbcommands.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/commands/dbcommands.h,v retrieving revision 1.44 diff -c -r1.44 dbcommands.h *** include/commands/dbcommands.h 5 Mar 2006 15:58:55 -0000 1.44 --- include/commands/dbcommands.h 23 Mar 2006 09:46:36 -0000 *************** *** 63,68 **** extern char *get_database_name(Oid dbid); extern void dbase_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void dbase_desc(char *buf, uint8 xl_info, char *rec); #endif /* DBCOMMANDS_H */ --- 63,68 ---- 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); #endif /* DBCOMMANDS_H */ Index: include/commands/sequence.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/commands/sequence.h,v retrieving revision 1.35 diff -c -r1.35 sequence.h *** include/commands/sequence.h 5 Mar 2006 15:58:55 -0000 1.35 --- include/commands/sequence.h 23 Mar 2006 09:46:36 -0000 *************** *** 91,97 **** extern void AlterSequence(AlterSeqStmt *stmt); extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void seq_desc(char *buf, uint8 xl_info, char *rec); /* Set the upper and lower bounds of a sequence */ #ifndef INT64_IS_BUSTED --- 91,97 ---- extern void AlterSequence(AlterSeqStmt *stmt); extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void seq_desc(StringInfo buf, uint8 xl_info, char *rec); /* Set the upper and lower bounds of a sequence */ #ifndef INT64_IS_BUSTED Index: include/commands/tablespace.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/commands/tablespace.h,v retrieving revision 1.12 diff -c -r1.12 tablespace.h *** include/commands/tablespace.h 5 Mar 2006 15:58:55 -0000 1.12 --- include/commands/tablespace.h 23 Mar 2006 09:46:36 -0000 *************** *** 48,53 **** extern bool directory_is_empty(const char *path); extern void tblspc_redo(XLogRecPtr lsn, XLogRecord *rptr); ! extern void tblspc_desc(char *buf, uint8 xl_info, char *rec); #endif /* TABLESPACE_H */ --- 48,53 ---- 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); #endif /* TABLESPACE_H */ Index: include/storage/smgr.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/storage/smgr.h,v retrieving revision 1.54 diff -c -r1.54 smgr.h *** include/storage/smgr.h 5 Mar 2006 15:59:00 -0000 1.54 --- include/storage/smgr.h 23 Mar 2006 09:46:36 -0000 *************** *** 85,91 **** extern void smgrsync(void); extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void smgr_desc(char *buf, uint8 xl_info, char *rec); /* internals: move me elsewhere -- ay 7/94 */ --- 85,91 ---- extern void smgrsync(void); extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record); ! extern void smgr_desc(StringInfo buf, uint8 xl_info, char *rec); /* internals: move me elsewhere -- ay 7/94 */