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

Commitc6ea616

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 parenta253a88 commitc6ea616

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
@@ -4806,8 +4806,6 @@ SubPostmasterMain(int argc, char *argv[])
48064806
/* do this as early as possible; in particular, before InitProcess() */
48074807
IsBackgroundWorker= true;
48084808

4809-
InitPostmasterChild();
4810-
48114809
/* Close the postmaster's sockets */
48124810
ClosePostmasterPorts(false);
48134811

@@ -4820,8 +4818,10 @@ SubPostmasterMain(int argc, char *argv[])
48204818
/* Attach process to shared data structures */
48214819
CreateSharedMemoryAndSemaphores(false,0);
48224820

4821+
/* Fetch MyBgworkerEntry from shared memory */
48234822
shmem_slot=atoi(argv[1]+15);
48244823
MyBgworkerEntry=BackgroundWorkerEntry(shmem_slot);
4824+
48254825
StartBackgroundWorker();
48264826
}
48274827
if (strcmp(argv[1],"--forkarch")==0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp