mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Remove XLogCtl->ckptFullXid.
A few code paths set this variable, but its value is never used.
Oversight in commit 2fc7af5e96
.
Reviewed-by: Aleksander Alekseev <aleksander@tigerdata.com>
Discussion: https://postgr.es/m/aHFyE1bs9YR93dQ1%40nathan
This commit is contained in:
@ -449,7 +449,6 @@ typedef struct XLogCtlData
|
|||||||
/* Protected by info_lck: */
|
/* Protected by info_lck: */
|
||||||
XLogwrtRqst LogwrtRqst;
|
XLogwrtRqst LogwrtRqst;
|
||||||
XLogRecPtr RedoRecPtr; /* a recent copy of Insert->RedoRecPtr */
|
XLogRecPtr RedoRecPtr; /* a recent copy of Insert->RedoRecPtr */
|
||||||
FullTransactionId ckptFullXid; /* nextXid of latest checkpoint */
|
|
||||||
XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */
|
XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */
|
||||||
XLogRecPtr replicationSlotMinLSN; /* oldest LSN needed by any slot */
|
XLogRecPtr replicationSlotMinLSN; /* oldest LSN needed by any slot */
|
||||||
|
|
||||||
@ -5744,7 +5743,6 @@ StartupXLOG(void)
|
|||||||
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB, true);
|
SetMultiXactIdLimit(checkPoint.oldestMulti, checkPoint.oldestMultiDB, true);
|
||||||
SetCommitTsLimit(checkPoint.oldestCommitTsXid,
|
SetCommitTsLimit(checkPoint.oldestCommitTsXid,
|
||||||
checkPoint.newestCommitTsXid);
|
checkPoint.newestCommitTsXid);
|
||||||
XLogCtl->ckptFullXid = checkPoint.nextXid;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear out any old relcache cache files. This is *necessary* if we do
|
* Clear out any old relcache cache files. This is *necessary* if we do
|
||||||
@ -7437,11 +7435,6 @@ CreateCheckPoint(int flags)
|
|||||||
UpdateControlFile();
|
UpdateControlFile();
|
||||||
LWLockRelease(ControlFileLock);
|
LWLockRelease(ControlFileLock);
|
||||||
|
|
||||||
/* Update shared-memory copy of checkpoint XID/epoch */
|
|
||||||
SpinLockAcquire(&XLogCtl->info_lck);
|
|
||||||
XLogCtl->ckptFullXid = checkPoint.nextXid;
|
|
||||||
SpinLockRelease(&XLogCtl->info_lck);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are now done with critical updates; no need for system panic if we
|
* We are now done with critical updates; no need for system panic if we
|
||||||
* have trouble while fooling with old log segments.
|
* have trouble while fooling with old log segments.
|
||||||
@ -8516,11 +8509,6 @@ xlog_redo(XLogReaderState *record)
|
|||||||
ControlFile->checkPointCopy.nextXid = checkPoint.nextXid;
|
ControlFile->checkPointCopy.nextXid = checkPoint.nextXid;
|
||||||
LWLockRelease(ControlFileLock);
|
LWLockRelease(ControlFileLock);
|
||||||
|
|
||||||
/* Update shared-memory copy of checkpoint XID/epoch */
|
|
||||||
SpinLockAcquire(&XLogCtl->info_lck);
|
|
||||||
XLogCtl->ckptFullXid = checkPoint.nextXid;
|
|
||||||
SpinLockRelease(&XLogCtl->info_lck);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We should've already switched to the new TLI before replaying this
|
* We should've already switched to the new TLI before replaying this
|
||||||
* record.
|
* record.
|
||||||
@ -8577,11 +8565,6 @@ xlog_redo(XLogReaderState *record)
|
|||||||
ControlFile->checkPointCopy.nextXid = checkPoint.nextXid;
|
ControlFile->checkPointCopy.nextXid = checkPoint.nextXid;
|
||||||
LWLockRelease(ControlFileLock);
|
LWLockRelease(ControlFileLock);
|
||||||
|
|
||||||
/* Update shared-memory copy of checkpoint XID/epoch */
|
|
||||||
SpinLockAcquire(&XLogCtl->info_lck);
|
|
||||||
XLogCtl->ckptFullXid = checkPoint.nextXid;
|
|
||||||
SpinLockRelease(&XLogCtl->info_lck);
|
|
||||||
|
|
||||||
/* TLI should not change in an on-line checkpoint */
|
/* TLI should not change in an on-line checkpoint */
|
||||||
(void) GetCurrentReplayRecPtr(&replayTLI);
|
(void) GetCurrentReplayRecPtr(&replayTLI);
|
||||||
if (checkPoint.ThisTimeLineID != replayTLI)
|
if (checkPoint.ThisTimeLineID != replayTLI)
|
||||||
|
Reference in New Issue
Block a user