Re: Restart pg_usleep when interrupted - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Restart pg_usleep when interrupted
Date
Msg-id CA+hUKGKpo3fM=rnfdxHqt+jNGh_zUNcL1ob4hMsb=jFfKn9Aag@mail.gmail.com
Whole thread Raw
In response to Re: Restart pg_usleep when interrupted  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Sun, Aug 18, 2024 at 11:12 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> I guess both of these issues go away in practice if
> CF #5118 goes in.

To be more precise, if you just keep doing pg_usleep() the issue goes
away, and likewise for posix_fallocate() it goes away...  But if you
switch to WaitLatchUs() so you can handle latch wakeups in vacuum
delays, which really you should because the latch might be an urgent
request for you to CHECK_FOR_INTERRUPTS(), because another backend is
waiting for all backends to service a ProcSignalBarrier (we need a new
name for that), well now you'll get wakeups, so you're back to square
one if someone is sending them very fast.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Restart pg_usleep when interrupted
Next
From: Alexander Lakhin
Date:
Subject: Re: Remove dependence on integer wrapping