We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente434ad3 commit7f6fa29Copy full SHA for 7f6fa29
src/backend/postmaster/bgworker.c
@@ -440,12 +440,14 @@ ReportBackgroundWorkerExit(slist_mutable_iter *cur)
440
{
441
RegisteredBgWorker*rw;
442
BackgroundWorkerSlot*slot;
443
+intnotify_pid;
444
445
rw=slist_container(RegisteredBgWorker,rw_lnode,cur->cur);
446
447
Assert(rw->rw_shmem_slot<max_worker_processes);
448
slot=&BackgroundWorkerData->slot[rw->rw_shmem_slot];
449
slot->pid=rw->rw_pid;
450
+notify_pid=rw->rw_worker.bgw_notify_pid;
451
452
/*
453
* If this worker is slated for deregistration, do that before notifying
@@ -458,8 +460,8 @@ ReportBackgroundWorkerExit(slist_mutable_iter *cur)
458
460
rw->rw_worker.bgw_restart_time==BGW_NEVER_RESTART)
459
461
ForgetBackgroundWorker(cur);
462
-if (rw->rw_worker.bgw_notify_pid!=0)
-kill(rw->rw_worker.bgw_notify_pid,SIGUSR1);
463
+if (notify_pid!=0)
464
+kill(notify_pid,SIGUSR1);
465
}
466
467