Re: Race condition in WaitForBackgroundWorkerStartup
От | Amit Kapila |
---|---|
Тема | Re: Race condition in WaitForBackgroundWorkerStartup |
Дата | |
Msg-id | CAA4eK1+QeMn8AgXQo7fko9DMQT0kOdBS+RMCNg24BwJ+XBrwXw@mail.gmail.com обсуждение исходный текст |
Ответ на | Race condition in WaitForBackgroundWorkerStartup (Jeremy Finzel <finzelj@gmail.com>) |
Ответы |
Re: Race condition in WaitForBackgroundWorkerStartup
|
Список | pgsql-hackers |
On Mon, Nov 12, 2018 at 11:55 PM Jeremy Finzel <finzelj@gmail.com> wrote: > > I believe I found a race condition in WaitForBackgroundWorkerStartup in the case where it encounters an ERROR during startup. I found that depending on the speed of the system, it will unreliably return either status BGWH_STOPPED or BGWH_STARTED. But I can reliably reproduce getting BGWH_STOPPED by tweaking the worker_spi.c test module. > Yeah, I think it is possible that you get different values in such cases because we consider worker status as started after we have launched the worker. Now, if we get the error in the worker initialization, then the user can get any of those values. I think this is what is happening in your case where you are saying "ERROR during startup". Am I missing something? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: