I am attaching v3 of the patch which addresses the comments made earlier by Bertrand about the comment in the patch [1]. Also I will stick with vacuum_sleep as the name as the function will be inside vacuum.c. I am not sure we should make this function available outside of vacuum, but I would like to hear other thoughts. Also, earlier in the thread, Alvaro mentions what happens if the sleep time is 0 [2]. In that case, we do not do anything as we check if sleep time is > 0 microseconds before proceeding with the sleep [1] https://www.postgresql.org/message-id/ZpDhS4nFX66ItAze%40ip-10-97-1-34.eu-west-3.compute.internal Regards, Sami |
v3-0001-vaccum_delay-with-absolute-time-nanosleep.patch
Description: Binary data