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

Commit3372f1a

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 parentfece13d commit3372f1a

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
@@ -4815,6 +4815,11 @@ XLOGShmemInit(void)
48154815
{
48164816
/* both should be present or neither */
48174817
Assert(foundCFile&&foundXLog);
4818+
4819+
/* Initialize local copy of WALInsertLocks and register the tranche */
4820+
WALInsertLocks=XLogCtl->Insert.WALInsertLocks;
4821+
LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
4822+
&XLogCtl->Insert.WALInsertLockTranche);
48184823
return;
48194824
}
48204825
memset(XLogCtl,0,sizeof(XLogCtlData));
@@ -7595,11 +7600,6 @@ InitXLOGAccess(void)
75957600
ThisTimeLineID=XLogCtl->ThisTimeLineID;
75967601
Assert(ThisTimeLineID!=0||IsBootstrapProcessingMode());
75977602

7598-
/* Initialize our copy of WALInsertLocks and register the tranche */
7599-
WALInsertLocks=XLogCtl->Insert.WALInsertLocks;
7600-
LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
7601-
&XLogCtl->Insert.WALInsertLockTranche);
7602-
76037603
/* Use GetRedoRecPtr to copy the RedoRecPtr safely */
76047604
(void)GetRedoRecPtr();
76057605
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp