From: Vadim B. Mikheev Date: Sat, 30 Dec 2000 06:52:34 +0000 (+0000) Subject: Fixed misprint in heap update WALoging. X-Git-Tag: REL7_1_BETA2~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c193f19a39383c2b73abe9d9cf021db2e465cfc7;p=postgresql Fixed misprint in heap update WALoging. --- diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 4de424598e..87b3e7090d 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.103 2000/12/28 13:00:06 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.104 2000/12/30 06:52:33 vadim Exp $ * * * INTERFACE ROUTINES @@ -1665,6 +1665,10 @@ l2: * without reading log if xact will abort before update is logged. * In the event of crash prio logging, TQUAL routines will see * HEAP_XMAX_UNLOGGED flag... + * + * NOTE: this trick is useless currently but saved for future + * when we'll implement UNDO and will re-use transaction IDs + * after postmaster startup. */ _locked_tuple_.node = relation->rd_node; _locked_tuple_.tid = *otid; @@ -2066,7 +2070,7 @@ log_heap_update(Relation reln, Buffer oldbuf, ItemPointerData from, hsize += (2 * sizeof(TransactionId)); } rdata[2].buffer = newbuf; - rdata[2].data = (char*)&xlhdr; + rdata[2].data = (char*)xlhdr; rdata[2].len = hsize; rdata[2].next = &(rdata[3]); diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index ff8916cd37..136ce1de7b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.46 2000/12/29 21:31:21 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.47 2000/12/30 06:52:34 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -2243,9 +2243,24 @@ xlog_desc(char *buf, uint8 xl_info, char* rec) static void xlog_outrec(char *buf, XLogRecord *record) { - sprintf(buf + strlen(buf), "prev %u/%u; xprev %u/%u; xid %u: %s", + int bkpb; + int i; + + sprintf(buf + strlen(buf), "prev %u/%u; xprev %u/%u; xid %u", record->xl_prev.xlogid, record->xl_prev.xrecoff, record->xl_xact_prev.xlogid, record->xl_xact_prev.xrecoff, - record->xl_xid, + record->xl_xid); + + for (i = 0, bkpb = 0; i < 2; i++) + { + if (!(record->xl_info & (XLR_SET_BKP_BLOCK(i)))) + continue; + bkpb++; + } + + if (bkpb) + sprintf(buf + strlen(buf), "; bkpb %d", bkpb); + + sprintf(buf + strlen(buf), ": %s", RmgrTable[record->xl_rmid].rm_name); }