Re:Re: Is Backgroundworker.bgw_restart_time is defined in seconds?

From: constzl <const_sunny(at)126(dot)com>
To: "Daniel Gustafsson" <daniel(at)yesql(dot)se>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re:Re: Is Backgroundworker.bgw_restart_time is defined in seconds?
Date: 2021-08-26 08:36:44
Message-ID: 760bcace.361d.17b819ab339.Coremail.const_sunny@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Yes, I got it wrong. You're right. Thank you for your explanation!<br/><br/>Best Regards,
At 2021-08-26 16:09:36, "Daniel Gustafsson" <daniel(at)yesql(dot)se> wrote:
>> On 26 Aug 2021, at 09:38, constzl <const_sunny(at)126(dot)com> wrote:
>
>> if ((worker->bgw_restart_time < 0 &&
>> worker->bgw_restart_time != BGW_NEVER_RESTART) ||
>> (worker->bgw_restart_time > USECS_PER_DAY / 1000))
>>
>> > The Backgroundworker.bgw_restart_time is defined in seconds,
>> > so should it be "USECS_PER_DAY / 1000,000" here instead of "USECS_PER_DAY / 1000"?
>> > Or am I getting it wrong?
>
>bgw_restart_time is defined as "It can be any positive value” in the docs, see:
>
> https://www.postgresql.org/docs/current/bgworker.html
>
>My reading of the above code is that is tries to catch nonsensical values, not
>to cap it to enforce restarts within a 24h period.
>
>--
>Daniel Gustafsson https://vmware.com/
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2021-08-26 14:04:03 Re: BUG #17157: authorizaiton of dict_int and bloom extention
Previous Message Daniel Gustafsson 2021-08-26 08:09:36 Re: Is Backgroundworker.bgw_restart_time is defined in seconds?