Re: bgworker crashed or not?
От | Tom Lane |
---|---|
Тема | Re: bgworker crashed or not? |
Дата | |
Msg-id | 30853.1391440857@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: bgworker crashed or not? (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: bgworker crashed or not?
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > This is admittedly a weird API, and we've had some discussion of > whether to change it, but I don't know that we've reached any final > conclusion. I'm tempted to propose exactly inverting the current > meaning of exit(0). That is, make it mean "don't restart me, ever, > even if I have a restart interval configured" rather than "restart me > right away, even if I have a restart interval configured". That way, > a background process that wants to run until it accomplishes some task > could be written to exit(1) on error and exit(0) on success, which > seems quite natural. Soexit(0) - done, permanentlyexit(1) - done until restart intervalexit(other) - crash and there's no way to obtain the "restart immediately" behavior? I think this is an improvement, but it probably depends on what you think the use-cases are for bgworkers. I can definitely see that there is a need for a bgworker to be just plain done, though. regards, tom lane
В списке pgsql-hackers по дате отправления: