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

Commitf489470

Browse files
committed
Fix Windows build.
Was broken by my xloginsert scaling patch. XLogCtl global variable needsto be initialized in each process, as it's not inherited by fork() onWindows.
1 parentb5ed219 commitf489470

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,23 +5074,23 @@ XLOGShmemInit(void)
50745074

50755075
ControlFile= (ControlFileData*)
50765076
ShmemInitStruct("Control File",sizeof(ControlFileData),&foundCFile);
5077-
allocptr=ShmemInitStruct("XLOG Ctl",XLOGShmemSize(),&foundXLog);
5077+
XLogCtl= (XLogCtlData*)
5078+
ShmemInitStruct("XLOG Ctl",XLOGShmemSize(),&foundXLog);
50785079

50795080
if (foundCFile||foundXLog)
50805081
{
50815082
/* both should be present or neither */
50825083
Assert(foundCFile&&foundXLog);
50835084
return;
50845085
}
5085-
XLogCtl= (XLogCtlData*)allocptr;
50865086
memset(XLogCtl,0,sizeof(XLogCtlData));
50875087

50885088
/*
50895089
* Since XLogCtlData contains XLogRecPtr fields, its sizeof should be a
50905090
* multiple of the alignment for same, so no extra alignment padding is
50915091
* needed here.
50925092
*/
5093-
allocptr+=sizeof(XLogCtlData);
5093+
allocptr= ((char*)XLogCtl)+sizeof(XLogCtlData);
50945094
XLogCtl->xlblocks= (XLogRecPtr*)allocptr;
50955095
memset(XLogCtl->xlblocks,0,sizeof(XLogRecPtr)*XLOGbuffers);
50965096
allocptr+=sizeof(XLogRecPtr)*XLOGbuffers;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp