mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Rename StartBackgroundWorker() to BackgroundWorkerMain().
The comment claimed that it is "called from postmaster", but it is actually called in the child process, pretty early in the process initialization. I guess you could interpret "called from postmaster" to mean that, but it seems wrong to me. Rename the function to be consistent with other functions with similar role. Reviewed-by: Thomas Munro Discussion: https://www.postgresql.org/message-id/4f95c1fc-ad3c-7974-3a8c-6faa3931804c@iki.fi
This commit is contained in:
@@ -4982,7 +4982,7 @@ SubPostmasterMain(int argc, char *argv[])
|
||||
shmem_slot = atoi(argv[1] + 15);
|
||||
MyBgworkerEntry = BackgroundWorkerEntry(shmem_slot);
|
||||
|
||||
StartBackgroundWorker();
|
||||
BackgroundWorkerMain();
|
||||
}
|
||||
if (strcmp(argv[1], "--forklog") == 0)
|
||||
{
|
||||
@@ -5721,7 +5721,7 @@ do_start_bgworker(RegisteredBgWorker *rw)
|
||||
MemoryContextDelete(PostmasterContext);
|
||||
PostmasterContext = NULL;
|
||||
|
||||
StartBackgroundWorker();
|
||||
BackgroundWorkerMain();
|
||||
|
||||
exit(1); /* should not get here */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user