From: constzl <const_sunny@126.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re:Re: Is Backgroundworker.bgw_restart_time is defined in seconds?
Date: Thu, 26 Aug 2021 16:36:44 +0800 (CST)
Message-ID: <760bcace.361d.17b819ab339.Coremail.const_sunny@126.com> (raw)
In-Reply-To: <5FD75B47-1F5F-470F-B349-0B54614A49A2@yesql.se>
References: <4baeccb.80f0.17b81651c54.Coremail.const_sunny@126.com>
<5FD75B47-1F5F-470F-B349-0B54614A49A2@yesql.se>
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@yesql.se> wrote:
>> On 26 Aug 2021, at 09:38, constzl <const_sunny@126.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/
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: const_sunny@126.com, daniel@yesql.se, pgsql-bugs@lists.postgresql.org
Subject: Re:Re: Is Backgroundworker.bgw_restart_time is defined in seconds?
In-Reply-To: <760bcace.361d.17b819ab339.Coremail.const_sunny@126.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox