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

Commitb6fe2df

Browse files
committed
Initialize shared memory copy of ckptXidEpoch correctly when not in recovery.
This bug was introduced by commit20d98ab,so backpatch this to 9.0-9.2 like that one.This fixes bug #6710, reported by Tarvi Pillessaar
1 parent3ac860f commitb6fe2df

File tree

1 file changed

+3
-4
lines changed
  • src/backend/access/transam

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6252,11 +6252,14 @@ StartupXLOG(void)
62526252
ereport(PANIC,
62536253
(errmsg("invalid next transaction ID")));
62546254

6255+
/* initialize shared memory variables from the checkpoint record */
62556256
ShmemVariableCache->nextXid=checkPoint.nextXid;
62566257
ShmemVariableCache->nextOid=checkPoint.nextOid;
62576258
ShmemVariableCache->oidCount=0;
62586259
MultiXactSetNextMXact(checkPoint.nextMulti,checkPoint.nextMultiOffset);
62596260
SetTransactionIdLimit(checkPoint.oldestXid,checkPoint.oldestXidDB);
6261+
XLogCtl->ckptXidEpoch=checkPoint.nextXidEpoch;
6262+
XLogCtl->ckptXid=checkPoint.nextXid;
62606263

62616264
/*
62626265
* We must replay WAL entries using the same TimeLineID they were created
@@ -6340,10 +6343,6 @@ StartupXLOG(void)
63406343
/* No need to hold ControlFileLock yet, we aren't up far enough */
63416344
UpdateControlFile();
63426345

6343-
/* initialize shared-memory copy of latest checkpoint XID/epoch */
6344-
XLogCtl->ckptXidEpoch=ControlFile->checkPointCopy.nextXidEpoch;
6345-
XLogCtl->ckptXid=ControlFile->checkPointCopy.nextXid;
6346-
63476346
/* initialize our local copy of minRecoveryPoint */
63486347
minRecoveryPoint=ControlFile->minRecoveryPoint;
63496348

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp