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

Commit250c26b

Browse files
committed
Fix checkpointer crash in EXEC_BACKEND builds.
Nothing in the checkpointer calls InitXLOGAccess(), so WALInsertLocksnever got initialized there. Without EXEC_BACKEND, it works anywaybecause the correct value is inherited from the postmaster, butwith EXEC_BACKEND we've got a problem. The problem appears to havebeen introduced by commit68a2e52.To fix, move the relevant initialization steps from InitXLOGAccess()to XLOGShmemInit(), making this more parallel to what we doelsewhere.Amit Kapila
1 parent93a028f commit250c26b

File tree

1 file changed

+5
-5
lines changed
  • src/backend/access/transam

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4841,6 +4841,11 @@ XLOGShmemInit(void)
48414841
{
48424842
/* both should be present or neither */
48434843
Assert(foundCFile&&foundXLog);
4844+
4845+
/* Initialize local copy of WALInsertLocks and register the tranche */
4846+
WALInsertLocks=XLogCtl->Insert.WALInsertLocks;
4847+
LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
4848+
&XLogCtl->Insert.WALInsertLockTranche);
48444849
return;
48454850
}
48464851
memset(XLogCtl,0,sizeof(XLogCtlData));
@@ -7619,11 +7624,6 @@ InitXLOGAccess(void)
76197624
ThisTimeLineID=XLogCtl->ThisTimeLineID;
76207625
Assert(ThisTimeLineID!=0||IsBootstrapProcessingMode());
76217626

7622-
/* Initialize our copy of WALInsertLocks and register the tranche */
7623-
WALInsertLocks=XLogCtl->Insert.WALInsertLocks;
7624-
LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
7625-
&XLogCtl->Insert.WALInsertLockTranche);
7626-
76277627
/* Use GetRedoRecPtr to copy the RedoRecPtr safely */
76287628
(void)GetRedoRecPtr();
76297629
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp