Re: suppressing useless wakeups in logical/worker.c
От | Nathan Bossart |
---|---|
Тема | Re: suppressing useless wakeups in logical/worker.c |
Дата | |
Msg-id | 20230126003319.GA1507251@nathanxps13 обсуждение исходный текст |
Ответ на | Re: suppressing useless wakeups in logical/worker.c (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: suppressing useless wakeups in logical/worker.c
|
Список | pgsql-hackers |
On Thu, Jan 26, 2023 at 01:23:41PM +1300, Thomas Munro wrote: > Can we also use TimestampDifferenceMilliseconds()? It knows about > rounding up for WaitLatch(). I think we might risk overflowing "long" when all the wakeup times are DT_NOEND: * This is typically used to calculate a wait timeout for WaitLatch() * or a related function. The choice of "long" as the result type * is to harmonize with that. It is caller's responsibility that the * input timestamps not be so far apart as to risk overflow of "long" * (which'd happen at about 25 days on machines with 32-bit "long"). Maybe we can adjust that function or create a new one to deal with this. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: