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

Commit5816f21

Browse files
committed
Remove duplicate InitPostmasterChild() call while starting a bgworker.
This is apparently harmless on Windows, but on Unix it results in anassertion failure. We'd not noticed because this code doesn't getused on Unix unless you build with -DEXEC_BACKEND. Bug was evidentlyintroduced by sloppy refactoring in commit31c4531.Thomas MunroDiscussion: <CAEepm=1VOnbVx4wsgQFvj94hu9jVt2nVabCr7QiooUSvPJXkgQ@mail.gmail.com>
1 parentd02b387 commit5816f21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4787,8 +4787,6 @@ SubPostmasterMain(int argc, char *argv[])
47874787
/* do this as early as possible; in particular, before InitProcess() */
47884788
IsBackgroundWorker= true;
47894789

4790-
InitPostmasterChild();
4791-
47924790
/* Close the postmaster's sockets */
47934791
ClosePostmasterPorts(false);
47944792

@@ -4801,8 +4799,10 @@ SubPostmasterMain(int argc, char *argv[])
48014799
/* Attach process to shared data structures */
48024800
CreateSharedMemoryAndSemaphores(false,0);
48034801

4802+
/* Fetch MyBgworkerEntry from shared memory */
48044803
shmem_slot=atoi(argv[1]+15);
48054804
MyBgworkerEntry=BackgroundWorkerEntry(shmem_slot);
4805+
48064806
StartBackgroundWorker();
48074807
}
48084808
if (strcmp(argv[1],"--forkarch")==0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp