# Re: suppressing useless wakeups in logical/worker.c

From: Tom Lane Nathan Bossart Thomas Munro , "Hayato Kuroda (Fujitsu)" , "pgsql-hackers(at)postgresql(dot)org" Re: suppressing useless wakeups in logical/worker.c 2023-01-26 21:09:51 3211341.1674767391@sss.pgh.pa.us Raw Message | Whole Thread | Download mbox | Resend email 2022-12-02 19:55:03 from Nathan Bossart 📎  2022-12-05 13:00:19 from "Hayato Kuroda (Fujitsu)"   2022-12-05 17:35:23 from Nathan Bossart    2023-01-09 17:42:17 from Nathan Bossart 📎     2023-01-24 23:45:08 from Tom Lane      2023-01-25 23:50:04 from Nathan Bossart 📎       2023-01-26 00:23:41 from Thomas Munro        2023-01-26 00:33:19 from Nathan Bossart         2023-01-26 02:27:57 from Tom Lane          2023-01-26 03:57:23 from Thomas Munro           2023-01-26 04:04:00 from Tom Lane            2023-01-26 18:54:08 from Tom Lane 📎             2023-01-26 19:48:12 from Nathan Bossart              2023-01-26 20:04:30 from Tom Lane               2023-01-26 20:23:01 from Nathan Bossart                2023-01-26 21:09:51 from Tom Lane 📎                 2023-01-26 21:22:55 from Nathan Bossart                  2023-01-26 22:37:05 from Tom Lane                   2023-01-28 04:56:25 from Amit Kapila                    2023-02-01 00:05:21 from Nathan Bossart                     2023-03-16 10:00:37 from Amit Kapila                      2023-03-17 00:22:55 from Nathan Bossart 📎                       2023-03-17 09:16:29 from Amit Kapila                        2023-07-04 07:48:23 from Daniel Gustafsson                         2023-07-04 18:37:58 from Nathan Bossart pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> On Thu, Jan 26, 2023 at 03:04:30PM -0500, Tom Lane wrote:
>> Hmm. I'm disinclined to add an assumption that the epoch is in the past,
>> but I take your point that the subtraction would overflow with
>> TIMESTAMP_INFINITY and a negative finite timestamp. Maybe we should
>> make use of pg_sub_s64_overflow()?

> That would be my vote. I think the 'diff <= 0' check might need to be
> replaced with something like 'start_time > stop_time' so that we return 0
> for the underflow case.

Right, so more like this.

regards, tom lane

Attachment Content-Type Size
fix-TimestampDifferenceMilliseconds-2.patch text/x-diff 4.3 KB

### Browse pgsql-hackers by date

From Date Subject
Next Message Justin Pryzby 2023-01-26 21:15:11 Re: Cygwin cleanup
Previous Message Thomas Munro 2023-01-26 21:06:45 Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)