From 727117fe4e170ae860fe18d01377d0a46c4d94f2 Mon Sep 17 00:00:00 2001 From: Tom Lane <tgl@sss.pgh.pa.us> Date: Sun, 1 Aug 2010 23:07:05 +0000 Subject: [PATCH] Back-patch fix for renaming asyncCommitLSN to asyncXactLSN. AIUI this was supposed to go into 9.0 as well as HEAD. --- src/backend/access/transam/xact.c | 6 +++--- src/backend/access/transam/xlog.c | 16 ++++++++-------- src/include/access/xlog.h | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index a74727eddd..9dead8a92b 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.293.2.1 2010/07/23 00:43:09 rhaas Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.293.2.2 2010/08/01 23:07:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1086,7 +1086,7 @@ RecordTransactionCommit(void) * Report the latest async commit LSN, so that the WAL writer knows to * flush this commit. */ - XLogSetAsyncCommitLSN(XactLastRecEnd); + XLogSetAsyncXactLSN(XactLastRecEnd); /* * We must not immediately update the CLOG, since we didn't flush the @@ -1384,7 +1384,7 @@ RecordTransactionAbort(bool isSubXact) * problems occur at that point. */ if (!isSubXact) - XLogSetAsyncCommitLSN(XactLastRecEnd); + XLogSetAsyncXactLSN(XactLastRecEnd); /* * Mark the transaction aborted in clog. This is not absolutely necessary diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 7fbccc5350..12e99dbcff 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.430 2010/07/06 19:18:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.430.2.1 2010/08/01 23:07:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -362,7 +362,7 @@ typedef struct XLogCtlData XLogwrtResult LogwrtResult; uint32 ckptXidEpoch; /* nextXID & epoch of latest checkpoint */ TransactionId ckptXid; - XLogRecPtr asyncCommitLSN; /* LSN of newest async commit */ + XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */ uint32 lastRemovedLog; /* latest removed/recycled XLOG segment */ uint32 lastRemovedSeg; @@ -1874,18 +1874,18 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch) } /* - * Record the LSN for an asynchronous transaction commit. - * (This should not be called for aborts, nor for synchronous commits.) + * Record the LSN for an asynchronous transaction commit/abort. + * (This should not be called for for synchronous commits.) */ void -XLogSetAsyncCommitLSN(XLogRecPtr asyncCommitLSN) +XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN) { /* use volatile pointer to prevent code rearrangement */ volatile XLogCtlData *xlogctl = XLogCtl; SpinLockAcquire(&xlogctl->info_lck); - if (XLByteLT(xlogctl->asyncCommitLSN, asyncCommitLSN)) - xlogctl->asyncCommitLSN = asyncCommitLSN; + if (XLByteLT(xlogctl->asyncXactLSN, asyncXactLSN)) + xlogctl->asyncXactLSN = asyncXactLSN; SpinLockRelease(&xlogctl->info_lck); } @@ -2134,7 +2134,7 @@ XLogBackgroundFlush(void) volatile XLogCtlData *xlogctl = XLogCtl; SpinLockAcquire(&xlogctl->info_lck); - WriteRqstPtr = xlogctl->asyncCommitLSN; + WriteRqstPtr = xlogctl->asyncXactLSN; SpinLockRelease(&xlogctl->info_lck); flexible = false; /* ensure it all gets written */ } diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 27e7f404d8..47e2268bad 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.114 2010/07/03 20:43:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.114.2.1 2010/08/01 23:07:05 tgl Exp $ */ #ifndef XLOG_H #define XLOG_H @@ -271,7 +271,7 @@ extern int XLogFileOpen(uint32 log, uint32 seg); extern void XLogGetLastRemoved(uint32 *log, uint32 *seg); -extern void XLogSetAsyncCommitLSN(XLogRecPtr record); +extern void XLogSetAsyncXactLSN(XLogRecPtr record); extern void RestoreBkpBlocks(XLogRecPtr lsn, XLogRecord *record, bool cleanup); -- 2.40.0