Re: clarify documentation of BGW_NEVER_RESTART ?

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: clarify documentation of BGW_NEVER_RESTART ?
Дата
Msg-id CAA4eK1JYVmqXQMqxv1u6GOkrOgXgRB4=WCnBj7yLmdtSDAMbgg@mail.gmail.com
обсуждение исходный текст
Ответ на clarify documentation of BGW_NEVER_RESTART ?  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
On Wed, Sep 26, 2018 at 3:17 AM Chapman Flack <chap@anastigmatix.net> wrote:
>
> I did not notice until today that there is some ambiguity in
> this paragraph:
>
>   bgw_restart_time is the interval, in seconds, that postgres should
>   wait before restarting the process, in case it crashes. It can be
>   any positive value, or BGW_NEVER_RESTART, indicating not to restart
>   the process in case of a crash.
>
> I had been reading "in case _it_ crashes" and "in case of _a_ crash"
> as "in case _the background worker_ crashes", so I assumed with
> BGW_NEVER_RESTART I was saying I don't want my worker restarted if
> _it_ flakes out while PG is otherwise operating normally.
>
> But I was surprised when the unrelated crash of a different, normal
> backend left my background worker killed and never restarted. I had
> always regarded the fatal-error kick-out-all-backends-and-recover
> handling as essentially equivalent to a PG restart, so I had expected
> it to start the bgworker over just as a real restart would.
>
> But sure enough, ResetBackgroundWorkerCrashTimes() gets called in
> that case, and treats every worker with BGW_NEVER_RESTART as gone
> and forgotten. So it seems the "it" in "it crashes" can be "the
> background worker" or "postgres itself" or "any shmem-connected
> backend".
>

I think that kind of wording might suit for BGW_NEVER_RESTART value,
but for any positive value, the current wording appears fine to me.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: pgsql: Build src/port files as a library with -fPIC, and usethat in li
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] kqueue