Re: Is Backgroundworker.bgw_restart_time is defined in seconds? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Is Backgroundworker.bgw_restart_time is defined in seconds?
Date
Msg-id 648775.1629986832@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is Backgroundworker.bgw_restart_time is defined in seconds?  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-bugs
Daniel Gustafsson <daniel@yesql.se> writes:
>> 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))

> 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.

This may be intended to guard against integer overflows later (he guesses
without having read the code).

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #17157: authorizaiton of dict_int and bloom extention
Next
From: Tom Lane
Date:
Subject: Re: BUG #17162: order by clause is not pushed down to foreign scans when a WHERE clause is given in query