>
> 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