|
7 | 7 | * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -362,7 +362,7 @@ typedef struct XLogCtlData
|
362 | 362 | XLogwrtResult LogwrtResult;
|
363 | 363 | uint32 ckptXidEpoch; /* nextXID & epoch of latest checkpoint */
|
364 | 364 | TransactionId ckptXid;
|
365 |
| - XLogRecPtr asyncCommitLSN; /* LSN of newest async commit */ |
| 365 | + XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */ |
366 | 366 | uint32 lastRemovedLog; /* latest removed/recycled XLOG segment */
|
367 | 367 | uint32 lastRemovedSeg;
|
368 | 368 |
|
@@ -1874,18 +1874,18 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
|
1874 | 1874 | }
|
1875 | 1875 |
|
1876 | 1876 | /*
|
1877 |
| - * Record the LSN for an asynchronous transaction commit. |
1878 |
| - * (This should not be called for aborts, nor for synchronous commits.) |
| 1877 | + * Record the LSN for an asynchronous transaction commit/abort. |
| 1878 | + * (This should not be called for for synchronous commits.) |
1879 | 1879 | */
|
1880 | 1880 | void
|
1881 |
| -XLogSetAsyncCommitLSN(XLogRecPtr asyncCommitLSN) |
| 1881 | +XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN) |
1882 | 1882 | {
|
1883 | 1883 | /* use volatile pointer to prevent code rearrangement */
|
1884 | 1884 | volatile XLogCtlData *xlogctl = XLogCtl;
|
1885 | 1885 |
|
1886 | 1886 | SpinLockAcquire(&xlogctl->info_lck);
|
1887 |
| - if (XLByteLT(xlogctl->asyncCommitLSN, asyncCommitLSN)) |
1888 |
| - xlogctl->asyncCommitLSN = asyncCommitLSN; |
| 1887 | + if (XLByteLT(xlogctl->asyncXactLSN, asyncXactLSN)) |
| 1888 | + xlogctl->asyncXactLSN = asyncXactLSN; |
1889 | 1889 | SpinLockRelease(&xlogctl->info_lck);
|
1890 | 1890 | }
|
1891 | 1891 |
|
@@ -2134,7 +2134,7 @@ XLogBackgroundFlush(void)
|
2134 | 2134 | volatile XLogCtlData *xlogctl = XLogCtl;
|
2135 | 2135 |
|
2136 | 2136 | SpinLockAcquire(&xlogctl->info_lck);
|
2137 |
| - WriteRqstPtr = xlogctl->asyncCommitLSN; |
| 2137 | + WriteRqstPtr = xlogctl->asyncXactLSN; |
2138 | 2138 | SpinLockRelease(&xlogctl->info_lck);
|
2139 | 2139 | flexible = false; /* ensure it all gets written */
|
2140 | 2140 | }
|
|
0 commit comments