Re: suppressing useless wakeups in logical/worker.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: suppressing useless wakeups in logical/worker.c
Date
Msg-id 2888102.1674705840@sss.pgh.pa.us
Whole thread Raw
In response to Re: suppressing useless wakeups in logical/worker.c  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: suppressing useless wakeups in logical/worker.c
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Thu, Jan 26, 2023 at 3:28 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It'd probably be reasonable to file down that sharp edge by instead
>> specifying that TimestampDifferenceMilliseconds will clamp overflowing
>> differences to LONG_MAX.  Maybe there should be a clamp on the underflow
>> side too ... but should it be to LONG_MIN or to zero?

> That got me curious... Why did WaitLatch() use long in the first
> place?

Good question.  It's not a great choice, because of the inherent
platform specificity.  OTOH, I'm not sure it's worth the pain
to change now.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: suppressing useless wakeups in logical/worker.c
Next
From: John Naylor
Date:
Subject: Re: New strategies for freezing, advancing relfrozenxid early