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

Commit5b8bd05

Browse files
Rename asyncCommitLSN to asyncXactLSN to reflect changed role in 9.0.
Transaction aborts now record their LSN to avoid corner casebehaviour in SR/HS, hence change of name of variables and functions.As pointed out by Fujii Masao. Cosmetic changes only.
1 parent478a2c1 commit5b8bd05

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.294 2010/07/23 00:43:00 rhaas Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.295 2010/07/29 22:27:27 sriggs Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1086,7 +1086,7 @@ RecordTransactionCommit(void)
10861086
* Report the latest async commit LSN, so that the WAL writer knows to
10871087
* flush this commit.
10881088
*/
1089-
XLogSetAsyncCommitLSN(XactLastRecEnd);
1089+
XLogSetAsyncXactLSN(XactLastRecEnd);
10901090

10911091
/*
10921092
* We must not immediately update the CLOG, since we didn't flush the
@@ -1384,7 +1384,7 @@ RecordTransactionAbort(bool isSubXact)
13841384
* problems occur at that point.
13851385
*/
13861386
if (!isSubXact)
1387-
XLogSetAsyncCommitLSN(XactLastRecEnd);
1387+
XLogSetAsyncXactLSN(XactLastRecEnd);
13881388

13891389
/*
13901390
* Mark the transaction aborted in clog. This is not absolutely necessary

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.430 2010/07/06 19:18:55 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.431 2010/07/29 22:27:27 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -362,7 +362,7 @@ typedef struct XLogCtlData
362362
XLogwrtResultLogwrtResult;
363363
uint32ckptXidEpoch;/* nextXID & epoch of latest checkpoint */
364364
TransactionIdckptXid;
365-
XLogRecPtrasyncCommitLSN;/* LSN of newest async commit */
365+
XLogRecPtrasyncXactLSN;/* LSN of newest async commit/abort */
366366
uint32lastRemovedLog;/* latest removed/recycled XLOG segment */
367367
uint32lastRemovedSeg;
368368

@@ -1874,18 +1874,18 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
18741874
}
18751875

18761876
/*
1877-
* Record the LSN for an asynchronous transaction commit.
1878-
* (This should not be called foraborts, norfor synchronous commits.)
1877+
* Record the LSN for an asynchronous transaction commit/abort.
1878+
* (This should not be called for for synchronous commits.)
18791879
*/
18801880
void
1881-
XLogSetAsyncCommitLSN(XLogRecPtrasyncCommitLSN)
1881+
XLogSetAsyncXactLSN(XLogRecPtrasyncXactLSN)
18821882
{
18831883
/* use volatile pointer to prevent code rearrangement */
18841884
volatileXLogCtlData*xlogctl=XLogCtl;
18851885

18861886
SpinLockAcquire(&xlogctl->info_lck);
1887-
if (XLByteLT(xlogctl->asyncCommitLSN,asyncCommitLSN))
1888-
xlogctl->asyncCommitLSN=asyncCommitLSN;
1887+
if (XLByteLT(xlogctl->asyncXactLSN,asyncXactLSN))
1888+
xlogctl->asyncXactLSN=asyncXactLSN;
18891889
SpinLockRelease(&xlogctl->info_lck);
18901890
}
18911891

@@ -2134,7 +2134,7 @@ XLogBackgroundFlush(void)
21342134
volatileXLogCtlData*xlogctl=XLogCtl;
21352135

21362136
SpinLockAcquire(&xlogctl->info_lck);
2137-
WriteRqstPtr=xlogctl->asyncCommitLSN;
2137+
WriteRqstPtr=xlogctl->asyncXactLSN;
21382138
SpinLockRelease(&xlogctl->info_lck);
21392139
flexible= false;/* ensure it all gets written */
21402140
}

‎src/include/access/xlog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.114 2010/07/03 20:43:58 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.115 2010/07/29 22:27:27 sriggs Exp $
1010
*/
1111
#ifndefXLOG_H
1212
#defineXLOG_H
@@ -271,7 +271,7 @@ extern intXLogFileOpen(uint32 log, uint32 seg);
271271

272272

273273
externvoidXLogGetLastRemoved(uint32*log,uint32*seg);
274-
externvoidXLogSetAsyncCommitLSN(XLogRecPtrrecord);
274+
externvoidXLogSetAsyncXactLSN(XLogRecPtrrecord);
275275

276276
externvoidRestoreBkpBlocks(XLogRecPtrlsn,XLogRecord*record,boolcleanup);
277277

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp