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

From Sami Imseih
Subject Re: Restart pg_usleep when interrupted
Date
Msg-id 9D64CD7C-CA24-4FF4-9421-3A1A63F87DAC@gmail.com
Whole thread Raw
In response to Re: Restart pg_usleep when interrupted  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Restart pg_usleep when interrupted
List pgsql-hackers
>
> Yeah, I had the same thought in [1], so +1.
>
> [1]: https://www.postgresql.org/message-id/ZpDhS4nFX66ItAze%40ip-10-97-1-34.eu-west-3.compute.internal
>

The intention ( see start of the thread ) was to make this a general API,
but I was not sure if there are use cases outside of vacuum.c.

In v8, I moved the function to pgsleep.c/signals.c and called it pg_usleep_non_interruptible.
The function, unlike vacuum_sleep, will take in micros as an argument to match with pg_usleep.

Regards

Sami



Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: libpq: Fix lots of discrepancies in PQtrace
Next
From: Thomas Munro
Date:
Subject: Re: On non-Windows, hard depend on uselocale(3)