bdr: Initialize bgw_notify_pid to 0
authorAlvaro Herrera <[email protected]>
Thu, 20 Feb 2014 17:46:40 +0000 (14:46 -0300)
committerAndres Freund <[email protected]>
Thu, 3 Jul 2014 15:55:18 +0000 (17:55 +0200)
Failure to do this resulted in a bgworker that would not run in some
cases.

contrib/bdr/bdr.c

index c990dabc1c3ffd5922954bbe05df3ee33cf4e984..94c5afc8b328dfa58ca126ce0a51a2c1b71d6d1a 100644 (file)
@@ -663,6 +663,7 @@ _PG_init(void)
    apply_worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
    apply_worker.bgw_main = bdr_apply_main;
    apply_worker.bgw_restart_time = 5;
+   apply_worker.bgw_notify_pid = 0;
 
    /* Common sequence worker values */
    sequencer_worker.bgw_flags = BGWORKER_SHMEM_ACCESS |
@@ -670,6 +671,7 @@ _PG_init(void)
    sequencer_worker.bgw_start_time = BgWorkerStart_RecoveryFinished;
    sequencer_worker.bgw_main = bdr_sequencer_main;
    sequencer_worker.bgw_restart_time = 5;
+   sequencer_worker.bgw_notify_pid = 0;
 
    foreach(c, cons)
    {