Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc193f19

Browse files
committed
Fixed misprint in heap update WALoging.
1 parentc0f9597 commitc193f19

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.103 2000/12/28 13:00:06 vadim Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.104 2000/12/30 06:52:33 vadim Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1665,6 +1665,10 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
16651665
* without reading log if xact will abort before update is logged.
16661666
* In the event of crash prio logging, TQUAL routines will see
16671667
* HEAP_XMAX_UNLOGGED flag...
1668+
*
1669+
* NOTE: this trick is useless currently but saved for future
1670+
* when we'll implement UNDO and will re-use transaction IDs
1671+
* after postmaster startup.
16681672
*/
16691673
_locked_tuple_.node=relation->rd_node;
16701674
_locked_tuple_.tid=*otid;
@@ -2066,7 +2070,7 @@ log_heap_update(Relation reln, Buffer oldbuf, ItemPointerData from,
20662070
hsize+= (2*sizeof(TransactionId));
20672071
}
20682072
rdata[2].buffer=newbuf;
2069-
rdata[2].data= (char*)&xlhdr;
2073+
rdata[2].data= (char*)xlhdr;
20702074
rdata[2].len=hsize;
20712075
rdata[2].next=&(rdata[3]);
20722076

‎src/backend/access/transam/xlog.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.46 2000/12/29 21:31:21 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.47 2000/12/30 06:52:34 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -2243,9 +2243,24 @@ xlog_desc(char *buf, uint8 xl_info, char* rec)
22432243
staticvoid
22442244
xlog_outrec(char*buf,XLogRecord*record)
22452245
{
2246-
sprintf(buf+strlen(buf),"prev %u/%u; xprev %u/%u; xid %u: %s",
2246+
intbkpb;
2247+
inti;
2248+
2249+
sprintf(buf+strlen(buf),"prev %u/%u; xprev %u/%u; xid %u",
22472250
record->xl_prev.xlogid,record->xl_prev.xrecoff,
22482251
record->xl_xact_prev.xlogid,record->xl_xact_prev.xrecoff,
2249-
record->xl_xid,
2252+
record->xl_xid);
2253+
2254+
for (i=0,bkpb=0;i<2;i++)
2255+
{
2256+
if (!(record->xl_info& (XLR_SET_BKP_BLOCK(i))))
2257+
continue;
2258+
bkpb++;
2259+
}
2260+
2261+
if (bkpb)
2262+
sprintf(buf+strlen(buf),"; bkpb %d",bkpb);
2263+
2264+
sprintf(buf+strlen(buf),": %s",
22502265
RmgrTable[record->xl_rmid].rm_name);
22512266
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp