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

Commit7a5c9ca

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

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
@@ -6227,11 +6227,14 @@ StartupXLOG(void)
62276227
ereport(PANIC,
62286228
(errmsg("invalid next transaction ID")));
62296229

6230+
/* initialize shared memory variables from the checkpoint record */
62306231
ShmemVariableCache->nextXid=checkPoint.nextXid;
62316232
ShmemVariableCache->nextOid=checkPoint.nextOid;
62326233
ShmemVariableCache->oidCount=0;
62336234
MultiXactSetNextMXact(checkPoint.nextMulti,checkPoint.nextMultiOffset);
62346235
SetTransactionIdLimit(checkPoint.oldestXid,checkPoint.oldestXidDB);
6236+
XLogCtl->ckptXidEpoch=checkPoint.nextXidEpoch;
6237+
XLogCtl->ckptXid=checkPoint.nextXid;
62356238

62366239
/*
62376240
* We must replay WAL entries using the same TimeLineID they were created
@@ -6330,10 +6333,6 @@ StartupXLOG(void)
63306333
/* No need to hold ControlFileLock yet, we aren't up far enough */
63316334
UpdateControlFile();
63326335

6333-
/* initialize shared-memory copy of latest checkpoint XID/epoch */
6334-
XLogCtl->ckptXidEpoch=ControlFile->checkPointCopy.nextXidEpoch;
6335-
XLogCtl->ckptXid=ControlFile->checkPointCopy.nextXid;
6336-
63376336
/* initialize our local copy of minRecoveryPoint */
63386337
minRecoveryPoint=ControlFile->minRecoveryPoint;
63396338

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp